日期:2014-05-17  浏览次数:20423 次

在PHP下操作网络驱动器的方法
<?
$path="\\\\cdi-test2\\users\\";
echo $path;
$dir=scandir($path);
print_r($dir);
?>

出现错误
\\cdi-test2\users\
Warning: scandir(\\cdi-test2\users\) [function.scandir]: failed to open dir: No such file or directory in E:\MYOA\webroot\33.php on line 13

Warning: scandir() [function.scandir]: (errno 2): No such file or directory in E:\MYOA\webroot\33.php on line 13

怎么样才能访问映射的网络驱动器。
------解决方案--------------------
要先映射网络驱动器到本地,然后用php操作
------解决方案--------------------
映射是可以的,除非你没有访问X:\\的权限
------解决方案--------------------
干嘛非要用PHP去操作机子系统的东西呢,PHP只适合做网站,数据读删改。