上传文件时仍然遇到同样的问题 - 我已经调试了但看到以下错误我感到难过?
在pase数据和请求将数据移动到永久位置之间的某处,它消失了Debug: ++ DB QUERY SUCCESSFUL
Passed file detials
array(1) { ["file"]=> array(5) { ["name"]=> string(10) "dblogo.png" ["type"]=> string(9) "image/png" ["tmp_name"]=> string(14) "/tmp/phpy3ZPgA" ["error"]=> int(0) ["size"]=> int(30182) } }
Warning: move_uploaded_file(/images/I8DfTdUehInQGjlp.png): failed to open stream: No such file or directory in /var/www/vhosts/jennys-cupcakes.co.uk/marble/file_upload.php on line 59 Warning: move_uploaded_file(): Unable to move '/tmp/phpy3ZPgA' to '/images/I8DfTdUehInQGjlp.png' in /var/www/vhosts/jennys-cupcakes.co.uk/marble/file_upload.php on line 59
File move results:
Debug: ++ FAILED TO MOVE FILE FROM /tmp/phpy3ZPgA TO /images/I8DfTdUehInQGjlp.png ++
答案 0 :(得分:0)
看起来你正试图转移到/images/
,这将是文件系统的根目录,可能它不存在,或者没有写入权限。如果您尝试保存到与脚本位于同一位置的images/
文件夹,请从图片路径的开头删除第一个/
。