PHP file Upload, with Move_uploaded_file This function can not move the file, and with copy or rename is indeed possible. PHP file Upload, with Move_uploaded_file This function can not move the file, and with copy or rename is indeed possible. The document is more ambiguous, that is, move_uploaded_file this function, add a step check, check whether the file is HTTP POST upload. Later, in the source code to see the file name and PHP configuration in the Upload_tmp_dir this parameter to compare, if the file is under this directory, then Move_uploaded_file will move operations. And this comparison is case sensitive,/\ is not the same under Windows. In the PHP configuration file parsing, will call a Realpath function, that is to say, before you move_uploaded_file, must be to $file[' tmp_name '] = Realpath ($file [' tmp_name ']); Realpath, please. On the other, note that is move_uploaded_file if configured as an unreachable path, Move_uploaded_file will never be able to move the file successfully, regardless of how it is handled. |