what is difference between copy() and move_uploaded_file()
我认为两个函数执行相同的操作然后有什么区别?
copy ( $_FILES['file']['tmp_name'],"C:/Apache/htdocs/" . $_FILES['file']['name'] ) move_uploaded_file($_FILES['file']['tmp_name'],"C:/Apache/htdocs/" . $_FILES['file']['name'])
This function checks to ensure that the file designated by filename is
a valid upload file (meaning that it was uploaded via PHP’s HTTP POST
upload mechanism). If the file is valid,it will be moved to the
filename given by destination.This sort of check is especially important if there is any chance that
anything done with uploaded files could reveal their contents to the
user,or even to other users on the same system.
http://php.net/manual/en/function.move-uploaded-file.php
If filename is not a valid upload file,then no action will occur,and move_uploaded_file() will return FALSE.