The website uses the thinkphp5 framework, and the server is built with wdcp
Then the public files are uploaded to the /website/public_html directory
Other inaccessible framework files are placed in the /website/ directory
But When php requires some classes in the /website/ directory, it will prompt Failed opening required
It is estimated that the wdcp setting causes no permissions
Attached is the apache setting in wdcp
<code><VirtualHost *:88> DocumentRoot /www/web/website/public_html ServerName new.website.com ServerAlias new.website.com ErrorDocument 400 /errpage/400.html ErrorDocument 403 /errpage/403.html ErrorDocument 404 /errpage/404.html ErrorDocument 503 /errpage/503.html php_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> </code>
May I ask the master how to solve the problem? Baidu can’t find it
The website uses the thinkphp5 framework, and the server is built with wdcp
Then the public files are uploaded to the /website/public_html directory
Other inaccessible framework files are placed in the /website/ directory
But When php requires some classes in the /website/ directory, it will prompt Failed opening required
It is estimated that the wdcp setting causes no permissions
Attached is the apache setting in wdcp
<code><VirtualHost *:88> DocumentRoot /www/web/website/public_html ServerName new.website.com ServerAlias new.website.com ErrorDocument 400 /errpage/400.html ErrorDocument 403 /errpage/403.html ErrorDocument 404 /errpage/404.html ErrorDocument 503 /errpage/503.html php_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> </code>
May I ask the master how to solve the problem? Baidu can’t find it
require /website/
Obviously something is wrong. The error message means that this directory does not exist at all. You need to use a relative path or /www/web/website here. You see, your apache configuration is written with DocumentRoot /www/web/website/public_html
.
If you definitely want to use an absolute path, it is best to execute echo __DIR__ first to see what the full path is.