配置的根目录是 public,为什么 resource_path()是 resources?
我想要的资源应该是public下。
但是
var_dump(resource_path());
返回
string(32) "/usr/local/var/www/tst/resources"
以下是nginx配置。
server {
listen 80;
server_name www.xxx.com;
rewrite . /index.php;
location / {
index index.php index.html index.htm;
autoindex on;
}
#proxy the php scripts to php-fpm
location ~ \.php$ {
root /usr/local/var/www/tst/public/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /$document_root$fastcgi_script_name;
include fastcgi_params;
}
推荐文章: