I need to scan directory /home/user/www/site/public_html/application
(full path by root).
scandir does perform it with even just 'application'
part of full path as argument and that's all going to be ok, I got now list of files and directories as result.
I am interesting how scandir does work with that path 'application'
? Ain't the argument should be a full path by root
?
I did not found any explanation to this behavior on official php.net, unfortunately.
Any idea, how it works? Thanks.
PS My DOCUMENT_ROOT
is set to /home/user/www/site/public_html
对于相对路径,它基于脚本的当前工作目录,您可以在getcwd
找到该目录。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.