Home > Backend Development > PHP Tutorial > PHP file upload example

PHP file upload example

WBOY
Release: 2016-07-25 08:45:15
Original
818 people have browsed it
  1. File Uploader
  2. File Upload

  3. Select a file to upload:

复制代码

uploader.php
  1. if( $_FILES['file']['name'] != "" )
  2. {
  3. copy ( $_FILES['file']['tmp_name'],
  4. "C:/Apache/htdocs/" . $_FILES['file']['name'] )
  5. or die( "Could not copy file" );
  6. }
  7. else
  8. {
  9. die( "No file specified" );
  10. }
  11. ?>
  12. Upload complete
  13. File upload succeeded...

    • Sent:
    • Size: bytes
    • Type:
  14. Click here to view file
复制代码

文件上传, PHP


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template