upupw 安装thinkcmf 5.0白屏问题

入口文件开启display_errors

ini_set('display_errors', 'on');
ini_set("display_errors","on");
error_reporting(E_ALL);

出现三个警告一个致命错误

Fatal error: require(): Failed opening required 'D:\UPUPW_AP5.6\htdocs

排查应该是设置根目录为xxx/public然后require上级目录出错

打开D:\UPUPW_AP5.6\Apache2\conf\httpd-vhosts.conf

找到对应的虚拟机配置



    DocumentRoot "D:/UPUPW_AP5.6/htdocs/sya/public"
    ServerName www.sya.com:80
    ServerAlias 127.0.0.26
    ServerAdmin [email protected]
    DirectoryIndex index.html index.htm index.php default.php app.php u.php
    ErrorLog logs/www.sya.com-error.log
    CustomLog logs/www.sya.com-access_%Y%m%d.log comonvhost
    php_admin_value open_basedir "D:\UPUPW_AP5.6\htdocs\sya\public\;D:\UPUPW_AP5.6\memcached\;D:\UPUPW_AP5.6\phpmyadmin\;D:\UPUPW_AP5.6\temp\;C:\WINDOWS\Temp\"

    Options FollowSymLinks
    AllowOverride All
    Require all granted


    Require all denied


    Require all denied

open_basedir "D:\UPUPW_AP5.6\htdocs\sya\public\;修改成open_basedir "D:\UPUPW_AP5.6\htdocs\sya\;重启apache即可

原因:open_basedir限制访问上级目录

你可能感兴趣的:(thkinkphp,php笔记,系统笔记)