When working with a call to files to connect to the current script, an error may occur:
Fatal error: require*(): Failed opening required ~/example.com/www/example.php in /home/example/example.com/www/somefile.php
require*():- the function by which the script accessed the file. Instead
requirethere may be other functions:
Failed opening required ~/example.com/www/example.php- the reason for the error. In this case, it is reported that the file
~/example.com/www/example.phpcannot be found at the specified path or cannot be accessed.
in /home/example/example.com/www/somefile.php- the file from which another file was accessed. This information can be useful for debugging.
The most common causes of this error:
/./- means the current directory. In fact, it can be omitted along the way, since it does not carry any changes in addressing.
/../- means parent directory. It is often used in scripts to form relative paths. For example, the path
example.com/www/include/../vendor/somefile.phpis actually a way
SomeFile.php, and in fact the file is stored in the file system under the name
somefile.php, then an error occurs that the file you are looking for was not found. Unlike Windows, files
somefile.phpthey are two different files.
640for files and