搭建thinkphp的时候,http://XXXX.com/pp/public/index.php/index/index/index2
一直报404,但是如果http://XXXX.com/pp/public/index.php 这样又可以正常访问
后来才知道是pathinfo的问题,由于不同的nginx的版本,所以在nginx.conf配置的时候也是不一样的
所以掉了很多坑,目前的是1.4版本的,直接修改
include enable-php.conf;
成
include enable-php-pathinfo.conf;
之后修改下php.ini
cgi.fix_pathinfo=0
改成
cgi.fix_pathinfo=1
重启php跟nginx
可以参考
https://blog.csdn.net/u014691098/article/details/77848394在使用php生成随机数的时候,$fp = @fopen(‘/dev/urandom’,’rb’); 出现失败的情况,直接在在php.ini后边加入
[HOST=baidu.com]
open_basedir=/home/wwwroot/baidu.com/:/tmp/:/proc/:/dev/
[PATH=/home/wwwroot/baidu.com/]
open_basedir=/home/wwwroot/baidu.com/:/tmp/:/proc/:/dev/
baidu.com 换成自己的域名
lnmp1.4 thinkphp2.3 php5.5.38 mysql14.14 环境搭建疑难杂症
最新推荐文章于 2019-06-15 17:42:56 发布