记录一次部署tp6所产生“ /t ”转换问题

浏览:171 发布日期:2019/08/22 分类:ThinkPHP6专区
1,使用Apache部署 (运行正常)



<VirtualHost *:80>

DocumentRoot "C:\phpStudy\PHPTutorial\WWW\tp6\public"

ServerName www.tp6.net

ServerAlias

<Directory "C:\phpStudy\PHPTutorial\WWW\tp6\public">

Options FollowSymlinks ExecCGI

AllowOverride All

Order allow,deny

Allow from all

Require all granted

</Directory>

</VirtualHost>



2,使用Nginx部署 (运行失败)

PS:产生错误

https://oss.alasbusy.com/uploads/20190822/826c3b405d817343431eca3eccfeb30c.png

https://oss.alasbusy.com/uploads/20190822/7526f83a717e07764f2aee3347910eab.png



没错 “/t” 被转换为了 水平制表符(HT)



https://oss.alasbusy.com/uploads/20190822/5f59b420e4953ec07405d8cf4a4a0e25.png





server {

listen 80;

server_name www.tp6.net tp6.net;

root "C:\phpStudy\PHPTutorial\WWW\tp6\public";

location / {

index index.html index.htm index.php;

#autoindex on;

}

location ~ \.php(.*)$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;

fastcgi_param script_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_path_info;

fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

include fastcgi_params;

}

}



解决方案:

"\" 换成 “/” 或者改名 就OK了


原文链接https://www.alasbusy.com/detail/68.html
最佳答案
评论( 相关
后面还有条评论,点击查看>>