nav*_*and 4 php path relative-path absolute-path opendir
我的 php 文件在这里:
D:/Appserv/www/x/y/file.php
我想从这个文件夹加载东西:
E:/foldie
我不知道哪条路会带我到那里。
$somePath="HELP ME HERE!!!!"
$dir=opendir($somePath);
//looping through filenames
while (false !== ($file = readdir($dir))) {
echo "$file\n";
}
Run Code Online (Sandbox Code Playgroud)
使用它应该工作的文件的完整 Windows 路径:“E:\folder\file.txt”
或者只是将文件复制到本地/项目目录中以进行测试。
| 归档时间: |
|
| 查看次数: |
7344 次 |
| 最近记录: |