d:/web/file
既然是这样,就肯定是windows下了,那就无法改777了
copy($myfile,"web/file".$myfile_name)
试试

解决方案 »

  1.   

    copy函数不能覆盖同名文件,如存在同名文件请先删除
      

  2.   

    大家来看看这就是我程序的代码啊
    $tfile_url=date("YmdHis");
            $doc=".doc";
            $file_url="$tfile_url.$doc";
            $upload_time=date("Y-m-d H:i:s");
            copy($myfile,"../files/$file_url");
            unlink($myfile);
    就是不好用啊,以前也用国啊不过是上传swf格式的文件,现在上传world文件就不好用了啊,我就做这个就是想让文件上传后,别人一打开网页能链到.doc文件上啊,大家看看还有什么好的办法啊。
      

  3.   

    大家看看这个是我在服务器端上传时报的错误
    Warning: Unable to open 'C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\样品.jpg' for reading: Permission denied in C:\root\ccut\ccub\gongwen\upload.php on line 8Warning: Unlink failed (Permission denied) in C:\root\ccut\ccub\gongwen\upload.php on line 9
    而在客户端报的错误是
    Warning: Unable to open 'D:\\web\\landun\\新建 文本文档.txt' for reading: No such file or directory in C:\root\ccut\ccub\gongwen\upload.php on line 8Warning: Unlink failed (No such file or directory) in C:\root\ccut\ccub\gongwen\upload.php on line 9
    大家帮我看看就竟是什么地方不对啊,我以前的代码是
    copy($MyFile,"d:/data/$grade/$MyFile_name");
    unlink($MyFile); 
    这个就好用啊