node.js - Why is the entire PHP code returned when accessing PHP files under webpack, but it can be accessed normally in a normal environment.
怪我咯
怪我咯 2017-05-16 13:13:01
0
4
452

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>

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(4)
过去多啦不再A梦

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

PHPzhong

You opened this PHP as a file.

洪涛

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?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template