我有一个路由,它是这个样子的
/**
* @Method({"DELETE"})
* @Route("/secure/users")
*/
当我尝试使用cUrl时
<html>
<head>
<meta charset="UTF-8" />
<title>An Error Occurred: Method Not Allowed</title>
</head>
<body>
<h1>Oops! An Error Occurred</h1>
<h2>The server returned a "405 Method Not Allowed".</h2>
<div>
Something is broken. Please let us know what you were doing when this error occurred.
We will fix it as soon as possible. Sorry for any inconvenience caused.
</div>
</body>
</html>
Request::enableHttpMethodParameterOverride();
实际上,在 app.dev 和 app_dev.php 中,我可以处理 PUT
请求。