Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用Slim framework来开发我的休息API。我的PUT请求有问题。我想在服务器端访问从客户端发送的变量。
Slim framework
API
PUT
$app->put('post/:pid', function ($pid) { //how to access other data sent from the client? }
参考下面的代码:
$app = \Slim\Slim::getInstance(); $request = $app->request(); $var = $request->put();
变量是 $var 处的数组形式