ResumesInn
Welcome  ,
Interview Questions >> PHP >> What is the difference between copy() & move_uploaded_file() in file uploading?
Next Question Previous Question

What is the difference between copy() & move_uploaded_file() in file uploading?



  Prasanjeet Ghosh wrote ...

Copy Makes a copy of a file. Returns TRUE if the copy succeeded otherwise return FALSE.

move_uploaded_file() function checks to ensure that the file designated by filename is a valid upload file. If the file is valid, it will be moved to the filename given by destination. If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.

  Joseph Ranjan wrote ...
Move : This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHPs HTTP POST upload mechanism). If the file is valid it will be moved to the filename given by destination. If filename is not a valid upload file then no action will occur and move_uploaded_file() will return FALSE.
  Joseph Ranjan wrote ...
copy() : Makes a copy of a file. Returns TRUE if the copy succeeded FALSE otherwise.


Login to write answer for this question !
Want to place your ads in this website ?
50USD Per Month for single placement. Contact Us
All Rights Reserved . Developed by SJRANJAN