php file upload

2019-08-27 21:51发布

问题:

anyone can explain file upload process in PHP. I mean what happens in backend internally.

like saving with temp name, moving to upload folder etc.

I want it's step by step working.

Thanks

回答1:

How to do file uploads is explained in the PHP Manual:

  • POST method uploads
  • Error Messages Explained
  • Common Pitfalls
  • Uploading multiple files
  • PUT method support

Please go through these chapters to learn how to do uploads.

If you want to know how File Uploads are implemented in the PHP core, check out

  • http://svn.php.net/viewvc/php/php-src/trunk/main/rfc1867.c?view=markup

Afaik, this is the module that handles this.

If none of the above do give you the information you are looking for, please refine your question to indicate what is missing.