我正在设置CURLOPT_CUSTOMREQUEST => 'PUT',在我的本地主机服务器中它按预期工作。但是在我的网络服务器中,我收到以下消息:
Method Not Implemented
GET to /web-services/index.php/attendance/user not supported.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
我发现了错误。我正在使用CURLOPT_CUSTOMREQUEST => 'PUT'。现在我只使用curl_setopt($ch,CURLOPT_HTTPHEADER,array('X-HTTP-Method-Override: PUT'));。