• PATHINFO配置

    PATHINFO配置

    如果你安装WeiPHP时出现下面这个界面PATHINFO配置 - 图1说明你的运行环境还不支持ThinkPHP,请先按ThinkPHP的文档进行配置:https://www.kancloud.cn/manual/thinkphp5_1/353955

    如果还不行,而且你的环境是Nginx的话,可以试试按下面配置

    打开你的nginx的conf配置文件,找到PHP参数的地方(一般有fastcgi_pass或fastcgi_index里)增加以下几行行

    1. fastcgi_split_path_info ^(.+\.php)(.*)$;
    2. fastcgi_param PATH_INFO $fastcgi_path_info;
    3. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    4. include fastcgi.conf;

    比如我的服务器是这样配置的:

    1. #PHP 脚本请求全部转发到 FastCGI处理. 使用FastCGI默认配置.
    2. location ~ \.php
    3. {
    4. fastcgi_pass unix:/dev/shm/php-cgi.sock;
    5. fastcgi_index index.php;
    6. fastcgi_split_path_info ^(.+\.php)(.*)$;
    7. fastcgi_param PATH_INFO $fastcgi_path_info;
    8. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    9. include fastcgi.conf;
    10. }