jQuery ajax() POST to Slim PHP framework

前端 未结 2 475
青春惊慌失措
青春惊慌失措 2021-02-10 20:21

Using jquery mobile+phonegap, trying to POST to a Slim application, I have this code:

$( document ).on( \"vclick\", \"#test_form\", function() {
            $.aj         


        
2条回答
  •  难免孤独
    2021-02-10 21:07

    Have you tried:

    $app->post('/', function() use ($app) {
           // ...
           $req = $app->request();
           echo json_encode($req->post('namec'));
           //...
    }
    

    Also this page should help

提交回复
热议问题