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>
走同樣的路,發(fā)現(xiàn)不同的人生
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
You did not set the return format
header('content-type:application/json;charset=utf8');
......
echo (json_encode(success))
What "success" should be returned?
But who is responsible for parsing php?