另一个驱动器中文件的路径? [英] Path to a file in a different drive?

查看:300
本文介绍了另一个驱动器中文件的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的php文件在这里: D:/Appserv/www/x/y/file.php

My php file is here: D:/Appserv/www/x/y/file.php

我要从此文件夹加载内容: E:/foldie

I want to load stuff from this folder: E:/foldie

我不知道那条路会指引我到那里.

I don't know what path will lead me there.

$somePath="HELP ME HERE!!!!"  
$dir=opendir($somePath);

//looping through filenames
while (false !== ($file = readdir($dir))) {
    echo "$file\n";
}

推荐答案

使用完整的Windows路径运行该文件:"E:\ folder \ file.txt"

Use full Windows path to the file it should be working: "E:\folder\file.txt"

或仅将文件复制到本地/项目目录中以进行测试.

or just copy the file in the local/project directory for testing purpose.

这篇关于另一个驱动器中文件的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆