mac环境下Nginx运行 PHP 项目乱码?
mac下apache运行该项目正常,
但使用 nginx运行该项目乱码 (其他项目正常)
且项目放到阿里云 ecs下 NGinx运行该项目也正常没有乱码。
有人遇到过类似的问题吗?】
nginx尝试设置charset UTF-8;无效果
server{
listen 8080;
root /usr/local/var/www/pb_02;
charset UTF-8;
access_log /logs/a_access.log;
error_log /logs/b_error.log;
location /{
index index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
charset UTF-8;
}
location ~ \.php$ {
root /usr/local/var/www/pb_02;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
charset UTF-8;
}
}
本作品采用《CC 协议》,转载必须注明作者和本文链接
会不会是 nginx 没有重启...
看下响应(Response)的字符集是什么