what is the difference between **./**folder-name/file.php and **../**folder-name/file.p开发者_StackOverflow中文版hp in php script?
Path is interpreted by operation system you're using:
./- usually means current folder../- usually means parent folder
If you're in folder /home/user, then
./folder-name/file.phpwill point to/home/user/folder-name/file.php- but
../folder-name/file.phpwill point to/home/folder-name/file.php, which is 1 level up
The first case, ./folder-name/file.php will start in your current directory.
The second case, ../folder-name/file.php will start from the parent directory.
../ is the directory below the directory you're currently in. ./ is the directory you're currently in. For example. If you are currently in /foo/bar. ../test.php is equivalent to /foo/test.php and ./test.php is equivalent to /foo/bar/test.php.
加载中,请稍侯......
精彩评论