问答详情
源自:2-2 Thinkphp的安装

为什么我把网站根目录配成public就文件访问就提示找不到文件了?

httpd-vhosts.conf的内容如下

# Virtual Hosts

#

<VirtualHost *:80>

ServerName localhost

DocumentRoot E:/GreenSoftware/wamp64/www/thinkphp/public

<Directory  "E:/GreenSoftware/wamp64/www/thinkphp/public/">

Options +Indexes +Includes +FollowSymLinks +MultiViews

AllowOverride All

Require local

</Directory>

</VirtualHost>

#


报错信息:

( ! ) Warning: require(E:\GreenSoftware\wamp64\www\thinkphp\public/../thinkphp/start.php): failed to open stream: No such file or directory in E:\GreenSoftware\wamp64\www\thinkphp\public\index.php on line 17

Call Stack

#

Time

Memory

Function

Location

1    0.0000    237896    {main}( )    ...\index.php:0    


( ! ) Fatal error: require(): Failed opening required 'E:\GreenSoftware\wamp64\www\thinkphp\public/../thinkphp/start.php' (include_path='.;C:\php\pear') in E:\GreenSoftware\wamp64\www\thinkphp\public\index.php on line 17

Call Stack

#

Time

Memory

Function

Location

1    0.0000    237896    {main}( )    ...\index.php:0    


提问者:雕曲百世 2017-05-20 22:28

个回答

  • vLiang
    2017-05-20 23:18:17
    已采纳

    <VirtualHost *:80>
        DocumentRoot "D:/xampp/htdocs/thinkphp/public"
        ServerName 127.0.0.1
    </VirtualHost>

    我是这样配置的 , 你可以看看文件的路径是否正确 

  • 雕曲百世
    2017-05-20 23:55:45

    找到问题所在了,是我前段时间改了目录的名字,没改文件,就停下来了,现在看视频后忘记自己改过名字了。