首页  >  文章  >  后端开发  >  PHP 文件上传示例

PHP 文件上传示例

WBOY
WBOY原创
2016-07-25 08:45:15794浏览
  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


声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn