Homemade ultra-simple PHP network hard drive

Source: Internet
Author: User

Php+html Ultra-Easy network hard drive with mixed writing

  1. Disk Online
  2. After the operation, refresh
  3. /*
  4. * Code written by MOT
  5. * 2012-5-20
  6. * Create a new folder with the name x under the root directory to upload files
  7. */
  8. if (Isset ($_request[' del ')) {
  9. Unlink ($_request[' del ');
  10. }
  11. Set_time_limit (0);
  12. if (Isset ($_post[' button '))
  13. if (isset ($_files[' file ')) {
  14. Move_uploaded_file ($_files[' file '] [' tmp_name '], ". \\x\\". $_files[' file ' [' name ']);
  15. }
  16. ?>
  17. $HL = Opendir (". \\x\\");
  18. }
  19. while (false! = $info = Readdir ($HL)) {
  20. if ($info = = '. ' | | $info = = ' ... ') continue;
  21. $x [] = $info;
  22. }
  23. if (Isset ($x))
  24. foreach ($x as $file) {
  25. $type = Explode ('. ', $file);
  26. $name = $type [0];
  27. $type = $type [1];
  28. $size = sprintf ("%.2f", ABS (FileSize (". \\x\\". $file))/1024/1024);
  29. ?>
  30. ?>
  31. file name type MD5 size Operation
    "> ">remove
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.