Recently studied the Laravel framework,
Require __dir__. ' /.. /bootstrap/autoload.php ';
What do you mean by this code?
The call is:
d:\web\laravel\public/. /bootstrap/autoload.php This path format is problematic;
And the real call is indeed:
D:\Web\Laravel\bootstrap\autoload.php
/In the path: /What does that mean? Can you tell me in detail, I read the PHP manual a few times, did not find this grammar ah;
Reply to discussion (solution)
Represents the autoload.php under the bootstrap directory under the __DIR__ directory under the upper directory
I am also just beginning to learn PHP, also take the laravel framework to study, _DIR_ is a magic constant after php5.3, used to point to the current execution of the PHP script is located in the directory, "." is a connector for connecting strings and variables,. /indicates the current directory of the previous level of directory, previously used DOS system should know, and now use the command-line tool is still used.
Require __dir__. ' /.. /bootstrap/autoload.php ';
Under fold:
__dir__ Magic constant represents the directory where the current running file is located, your own echo __dir__; Look, the directory path it outputs is not/ended;
.. /represents the top-level directory at the current location;
Represents the autoload.php under the bootstrap directory under the __DIR__ directory under the upper directory
The main question is: __dir__. ' /.. /bootstrap Here's/... /No in the beginning position, the path of the string is not right ah;
Require __dir__. ' /.. /bootstrap/autoload.php ';
Under fold:
__dir__ Magic constant represents the directory where the current running file is located, your own echo __dir__; Look, the directory path it outputs is not/ended;
.. /represents the top-level directory at the current location;
The main questions are:
The result of the string connection is D:\Web\Laravel\public/. /bootstrap/autoload.php This path is legal?
Represents the bootstrap/autoload.php file under the parent directory of the current directory.