move_uploaded_file
会事先检测源文件是否通过php上传过来的,否则不予移动;移动,即操作成功后原
文件没了,这个函数是基于安全考虑的,和文件大小没有关系(上传文件的大小主要受 php.ini 中 upload_max_filesize
的影响)
move_uploaded_file()不能文件与文件之间对传,而copy()就可以对传.比如说:if(move_uploaded_file($file[‘tmp_name’],$upload_da_dir)||(makethumb($upload_da_dir,$a,600,800,0,1))){
if(copy($upload_da_dir,$upload_xiao_dir)||(makethumb($upload_xiao_dir,$b,100,118,0,1))){//第二个就不能用move_uploaded_file()了 只能用copy(),or就不能达到功能
move_upload_file() when executed will move the file to the directory assigned in parameter, move_uploaded_file has some additional security checks to ensure that the file was actually uploaded.
copy(), the file will also be copied to the directory assigned in parameter, but the file being copied will not be removed from the temporary directory until the script has exited and PHP performs it destruction or shutdown process.