Encountered a PHP problem I upload images with uploadify plugin failed to know what is the reason for the plug-in did not tell me the error I backstage Echo found Move_uploaded_file () returns a false function of two parameters are then found in the temporary folder/private/ var/tmp/did not generate the file to be uploaded p.s. I use the Mac when the server is the system permissions problem?
Reply to discussion (solution)
The uploaded file is reserved for this request only, which means that when your code is finished, the temporary file will be destroyed and you will not be able to see it.
This situation is mostly related to the permissions of the target directory and requires write permission to the target directory owner
The uploaded file is reserved for this request only, which means that when your code is finished, the temporary file will be destroyed and you will not be able to see it.
This situation is mostly related to the permissions of the target directory and requires write permission to the target directory owner
has given everyone permission to read and write, or not to ask for help ~
$to = files to be moved to the new directory; Var_dump ($FILES, $to, Is_writable (dirname ($to)));
See what results?
PHP code?12$to = files to be moved to the new directory; Var_dump ($FILES, $to, Is_writable (dirname ($to)));
See what results?
String ("/private/var/tmp/phpctmjjv")
String ("/library/webserver/documents/handler/uploads/6573d7a11f3e8ed173239f20e3de3f7d")
BOOL (FALSE)
How to solve it?
/library/webserver/documents/handler/uploads/does not have all writable permissions, so is_writable returns false
/library/webserver/documents/handler/uploads/does not have all writable permissions, so is_writable returns false
String ("/private/var/tmp/phpurxycu")
String ("/library/webserver/documents/handler/uploads/b4f1262969d27fee9c4a867a8d109573")
BOOL (TRUE)
Now give permission and then find the Uploads folder is still empty, uh.
So this time move_uploaded_file () return or FALSE, how do 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 the return is true false then I don't know what the situation is.
So this time move_uploaded_file () return or FALSE, how do 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, I'm 2. Move code let me//now OK thank you ~