-2

使用 Slim 2 框架从 URI 获取属性

http://localhost:8080/serverEndModule1/v1/varifyid =OQ==&code=1e212ffc375e52a9c6e7debe8adcc17 使用以下代码:

$app->get('/varify', function () use ($app) {
$id = $app->request->get('id');
$paramValue2 = $app->request->get('code');
$db = new DbOperation();
$response = array();
$db->userVarify($id, $code); // send to database 

帮我实现以下 $app->get route 。

4

1 回答 1

0

谢谢我现在知道了

$app->get('/varify', function() 使用 ($app){

 $req = $app->request();
$id = $req->get('id');   // 
$code = $req->get('code');


 $db = new DbOperation();
$response = array();

$res= $db->userVarify($id, $code); }

于 2017-04-18T08:58:49.403 回答