[英]move_uploaded_file not working in CQhost server
I have tried so many working codes for moving file to specific folder . 我已经尝试了许多将文件移动到特定文件夹的工作代码。
It is working in other servers and localhost, but not working in CQhost only. 它可以在其他服务器和本地主机上运行,但不能仅在CQhost中运行。 What did wrong with these host?
这些主机出了什么问题?
Is any one done with CQhost file upload. CQhost文件上传完成了吗?
Here is my simplest PHP code to test it. 这是我最简单的PHP代码进行测试。
$target= rand(100, 999).'.png';
$target1="uploads/".$target;
move_uploaded_file($_FILES['image']['tmp_name'],$target1);
and also html there with form action and enctype. 还有html,其中包含表单action和enctype。
Please help me 请帮我
Apache server should have permission to write file in uploads/ folder first. Apache服务器应该有权首先在uploads /文件夹中写入文件。 Are you check that folder permission ?
您是否检查文件夹权限? You may want to change folder permission to 777.
您可能需要将文件夹权限更改为777。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.