Please help me ~ Uploadify image upload problems

Source: Internet
Author: User
Please help me ~ Uploadify image Upload has encountered a php problem. I used the uploadify plug-in to upload images. I don't know why. The plug-in didn't report an error to me. I found move_uploaded_file () in the background echo () the two parameters of the false function are returned, and the file to be uploaded is not generated in the temporary folder/private/var/tmp. is my mac a system Permission problem for the server?


Reply to discussion (solution)

The uploaded file is only retained for this request. that is to say, when your code ends, the temporary file will be destroyed and you will not be able to see it.
This situation is mostly related to the permission of the target directory. you need to grant the write permission to the target directory owner.

The uploaded file is only retained for this request. that is to say, when your code ends, the temporary file will be destroyed and you will not be able to see it.
This situation is mostly related to the permission of the target directory. you need to grant the write permission to the target directory owner.

I have granted everyone the read and write permissions, but I still cannot ask for help ~

$ To = file to be moved to the new directory; var_dump ($ FILES, $ to, is_writable (dirname ($ )));

What are the results?

PHP code? 12 $ to = the file to be moved to the new directory; var_dump ($ FILES, $ to, is_writable (dirname ($ )));
What are the results?

String (26) "/private/var/tmp/phpctmJJV"
String (77) "/Library/WebServer/Documents/handler/uploads/6573d7a11f3e8ed173239f20e3de3f7d"
Bool (false)

How can this problem be solved?

/Library/WebServer/Documents/handler/uploads/has no write permission for all, so is_writable returns false

/Library/WebServer/Documents/handler/uploads/has no write permission for all, so is_writable returns false

String (26) "/private/var/tmp/phpURXYCu"
String (77) "/Library/WebServer/Documents/handler/uploads/b4f1262969d27fee9c4a867a8d109573"
Bool (true)
Now I have granted the permission and found that the uploads folder is still empty ..

Is the returned value of move_uploaded_file () false? how did you call it?
Try this:

$ From = "/private/var/tmp/phpURXYCu "; // source file $ _ FILES ['name'] ['tmp _ name'] $ to = "/Library/WebServer/Documents/handler/uploads/b4f1262969d27fee9c4a867a8d109573 "; var_dump (is_readable ($ from), file_put_contents ($ to, file_get_contents ($ from )));

If true or false is returned, I do not know what the situation is.

Is the returned value of move_uploaded_file () false? how did you call it?
Try this:

PHP code? 123 $ from = "/private/var/tmp/phpURXYCu "; // source file $ _ FILES ['name'] ['tmp _ name'] $ to = "/Library/WebServer/Documents/handler/up ......

Okay. the code for moving me 2 makes it OK. thank you ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.