gongzhonghao.png
扫码关注我们
最新赞助活动温馨提示:自愿赞助服务器费用,学生和没有工作的整站资源免费下载!
头像

php种对于require上级目录提示没有权限那么请问怎么样配置apache

来源:http://erdangjiade.com/topic/2863.html 你好,世界。 2017-09-25 22:42浏览(7)

网站使用了thinkphp5框架,服务器采用wdcp搭建的
然后将公共文件上传到了/website/public_html目录中
其他不可访问的框架文件放在了/website/目录中
但是当php require /website/目录中的一些类的时候,他会提示Failed opening required
估计是wdcp的设置导致没有权限
附上wdcp中apache的设置

<VirtualHost *:88>
DocumentRoot /www/web/website/public_html
ServerName new.website.comServerAlias new.website.
comErrorDocument 400 /errpage/400.htmlErrorDocument 403 /errpage/403.htmlErrorDocument 404 /errpage/404.htmlErrorDocument 503 /errpage/503.htmlphp_admin_value open_basedir /www/web/website:/tmp
<IfModule mod_deflate.c>
    DeflateCompressionLevel 7
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
    AddOutputFilter DEFLATE css js html htm gif jpg png bmp php
</IfModule>
</VirtualHost>
<Directory /www/web/website>
    Options FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

请问大神如何解决,百度了也百度不到

require /website/明显不对,错误信息的意思也是这个目录根本不存在,这里要用相对路径或者/www/web/website。你看,你的apache配置都写了DocumentRoot /www/web/website/public_html。
如果一定想用绝对路径最好先执行一次 echo DIR,看看到底完整路径是什么。

以上就是php种关于require上级目录提示没有权限那么请问如何配置apache的详细内容,更多请关注二当家的素材网其它相关文章!

评论0
头像

友情提示:垃圾评论一律封号 加我微信:826096331拉你进VIP群学习群

1 2