简体   繁体   中英

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. What did wrong with these host?

Is any one done with CQhost file upload.

Here is my simplest PHP code to test it.

$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.

Please help me

Apache server should have permission to write file in uploads/ folder first. Are you check that folder permission ? You may want to change folder permission to 777.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM