Why is the entire PHP code returned when accessing PHP files under webpack, but it can be accessed normally in a normal environment.
< /p>
< /p>
< /p>
过去多啦不再A梦2017-05-16 13:15:01
Webpack is an independent server environment and does not support parsing php. Just write a json file request for simulated data, or you can run php on the Apache server to turn off cross-domain restrictions and then request again
PHP中文网2017-05-16 13:15:01
You did not set the return format
header('content-type:application/json;charset=utf8');
......
echo (json_encode(success))
迷茫2017-05-16 13:15:01
What "success" should be returned?
But who is responsible for parsing php?