PHP7 + Nginx 打开php页面显示空白
2022-07-28 15:20:24
112
{{single.collect_count}}

最近在新的Ubuntu 16 上配置php7 + nginx,发现访问php页面出现空白,日志中也没有错误信息,google后找到的解决办法。

参考原文:http://stackoverflow.com/questions/15423500/nginx-showing-blank-php-pages

修改站点配置信息,如下即可:

location ~ \.php$ {include /path/to/fastcgi_params;fastcgi_pass127.0.0.1:9000;# fastcgi_pass unix:/var/run/php7-fpm.sock;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME;$document_root/$fastcgi_script_name;}
回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}