<?
$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 13Warning: scandir() [function.scandir]: (errno 2): No such file or directory in E:\MYOA\webroot\33.php on line 13怎么样才能访问映射的网络驱动器。

解决方案 »

  1.   

    要先映射网络驱动器到本地,然后用php操作
      

  2.   

    映射为X:盘
    <?
    $path="X:\\";
    echo $path;
    $dir=scandir($path);
    print_r($dir);
    ?>出现错误
    X:\
    Warning: scandir(X:\) [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
      

  3.   

    我直接在浏览器上输入X:\是可以正常显示映射的内容。但到了通过php访问就出现上面的错误
      

  4.   

    干嘛非要用PHP去操作机子系统的东西呢,PHP只适合做网站,数据读删改。
      

  5.   


    朋友您好!我现在也遇到这个问题,急需解决,困扰我好久了。请你帮忙解答万分感谢哈!!A机器为172.16.2.1,B机器为172.16.2.2,我的web服务器装在A机器上,需要通过PHP访问B机器上的某图片文件image.png。应该怎么操作啊?你说可以用盘符映射,我试了,不行啊映射的盘符在PHP代码里应该怎么写呢?我写Z:\\不对啊肯定大侠帮帮忙啊!!