PHP move_uploaded_file 另一个不起作用 [英] PHP move_uploaded_file yet another not working

查看:38
本文介绍了PHP move_uploaded_file 另一个不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的想不通,只是有一个基本的上传脚本,但文件无法上传.

I really can't figure this one out, just got a basic upload script but the file wont upload.

Form 
 => enctype is set

print_r($_FILES['Product_Thumb']) 
 => [Product_Thumb] 
  => Array ( 
      [name] => prototype.js 
      [type] => application/x-javascript 
      [tmp_name] => /tmp/phpXzL6CT 
      [error] => 0 
      [size] => 139854 ))

我确实将上传文件夹的权限 (-R) 设置为 777.将所有者:组更改为 www-data:www-data.
Mkdir 适用于我用于上传文件的确切路径.尝试了不同的文件,尝试了另一个文件夹,硬编码了目标文件路径,仍然不起作用.

I did set the permissons (-R) to 777 on the upload folder. Changed the owner:group to www-data:www-data.
Mkdir works on the exact path I used for the upload file. Tried different files, tried another folder, hardcoded the destination filepath, still doesnt work.

我在/var/tmp/中看到该文件,但移动无法正常工作,完全没有错误.

I see the file in /var/tmp/ but the moving is just not working, no error nothing at all.

我真的忽略了什么吗?

提前谢谢!

========================================================================调试输出:

======================================================================= Debug output:

调试:tmp文件:/tmp/phpgYOo9a

Debug: tmp file:/tmp/phpgYOo9a

调试:目标目录:/var/www/clubgevoel/public/img/producten/

Debug: target directory: /var/www/clubgevoel/public/img/producten/

调试:真实目标:/var/www/clubgevoel/public/img/producten

Debug: real target: /var/www/clubgevoel/public/img/producten

调试:源代码可读:

调试:目标 is_dir:是

Debug: target is_dir: yes

调试:目标可写:是

调试:移动:bool(false)

Debug: move: bool(false)

推荐答案

Debug: tmp file:/tmp/phpgYOo9a

Debug: tmp file:/tmp/phpgYOo9a

调试:目标目录:/var/www/clubgevoel/public/img/producten/

Debug: target directory: /var/www/clubgevoel/public/img/producten/

调试:真实目标:/var/www/clubgevoel/public/img/producten

Debug: real target: /var/www/clubgevoel/public/img/producten

调试:源代码可读:

调试:目标 is_dir:是

Debug: target is_dir: yes

调试:目标可写:是

调试:移动:bool(false)

Debug: move: bool(false)

这篇关于PHP move_uploaded_file 另一个不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆