-
Notifications
You must be signed in to change notification settings - Fork 1.6k
POST请求不成功? #42
Comments
Please try to use english, especially on this repository, since it's not maintained by Evan 😄 |
Very strange,In PHP Can't get to POST data ,See code: |
There must be something wrong on JS code, you didn't post it complete, there is even syntax error:
|
No error, the request was successful. |
you probably mean |
Excuse me, My carelessness,please don't tangle in location.href and 'location.href'., |
@seekwe The post data is send JSON encoded, in order to decode it in PHP you need to do this: $data = json_decode(file_get_contents('php://input'), true);
var_dump($data); If you want to use the normal $_POST data you need to enable the emulateJSON option: Vue.http.options.emulateJSON = true; |
thanks! The original is the problem of request payload :) |
what does it mean request payload. |
在php里 var_dump($_POST) == array(0) { } ?
应该是 array(3) { ["name"]=> string(2) "32" ["phone"]=> string(2) "23" ["num"]=> string(1) "0" }才对啊
The text was updated successfully, but these errors were encountered: