//$file_dir="c:\\Inbox\\re.txt"; 
$file_dir="Y:\\Inbox\\re.txt"; 
$fp=fopen($file_dir,"r"); y:已经映射在本机上了,通过本机可以读些这个文件夹 
报错fopen(Y:\\Inbox\\re.txt): failed to open stream: No such file or directory ,但是,打开本地C盘的文件是可以的 我用什么方法才能读取映射在本机上的文件呢?或者如何把该文件COPY到本地呢

解决方案 »

  1.   

    拷贝文件例子
    $file = 'example.txt';
    $newfile = 'example.txt.bak';if (!copy($file, $newfile)) {
        echo "failed to copy $file...\n";
    }
      

  2.   


    $file =  'example.txt '; 
    $newfile =  'example.txt.bak '; if (!copy($file, $newfile)) { 
        echo "failed to copy $file...\n"; 

      

  3.   

    web服务器运行的帐户一般是LocalSystem,就不能访问WINDOWS共享
      

  4.   

    Web服务器运行的WINDOWS帐户不允许访问WINDOWS共享