使用 symfony 框架時 配置運行環境時 報debug 工具欄問題及 No input file specified.

錯誤一:php

 

 錯誤二:點擊跳轉時:No input file specified.nginx

 

 

解決方法:配置nginx.conf時 增長如下代碼:app

 

 

location / {    index  app_dev.php;    try_files $uri @rewriteapp;}location @rewriteapp {    rewrite ^(.*)$ /app_dev.php/$1 last;}location ~ ^/(app|app_dev)\.php(/|$) {    fastcgi_pass   127.0.0.1:9000;    fastcgi_split_path_info ^(.+\.php)(/.*)$;    include fastcgi_params;    fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;    fastcgi_buffer_size 128k;    fastcgi_buffers 8 128k;}
相關文章
相關標籤/搜索