php-move_uploaded_file

作者:  耕堂 | 本文浏览1040次 | 2010年03月16日

php函数move_uploaded_file经常用于文件上传(和它类似的还有个copy),曾经遇到过warning:failed to open stream问题,文件无法上传:
move_uploaded_file函数使用中重要的是上传路径,直接注明网址的路径会出现文件无法上传的情况,错误提示一般包含HTTP wrapper does not support writeable connections,据自己的理解是上传路径有问题,如果是本地测试的话,把上传路径改一下就可以了,类似下面这样:

$upDir = “D:/Program Files/PHP/html/Geta/a/”.$targetFolder;

$targetFolder是目标文件夹,可以看出来上传路径要是绝对路径;

 右上方更多相关内容/站内搜索-关键词请用空格隔开

  • 标签 : 
  • 原文链接 : http://www.gengtang.net/dian-di/php-move_uploaded_file.html
  • 转载原创文章请注明 : 耕堂-gengtang.net
  •  “php-move_uploaded_file” 有1条评论

    发表留言

    可用HTML标签:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>