本地测试好的TP5部署到服务器遇到的问题解决

问题1:The requested URL /xxxx.html was not found on this server

原因:apache的重写未开启,开启重写后,问题解决,

方法如下:

apache 打开 httpd.conf 文件 找到AllowOverride None 改为 AllowOverride All

问题2:Class 'think\model' not found

进入当前模块,将model改写为Model大写的就可以了。

问题3:找不到模板文件

template not exists:/xxxxxxxxxx/index.html

估计还是大小写的问题,这就需要mv修改一下你的文件名字了!!!

问题4:请求数据遇到了跨域问题,毛线的跨域问题,网上每一个解决好的,都他娘的瞎扯,却一句话,放到你的后端程序就好了!!!

header(“Access-Control-Allow-Origin:*”);

你可能感兴趣的:(thinkphp5)