Homemade ultra-simple PHP network hard drive
PHP + HTML hybrid write ultra-simple network hard drive
-
- Disk online
Refresh after operation
- /*
- * Code written by mot
- * 2012-5-20
- * Create a folder named x under the root directory to store the uploaded files.
- */
- If (isset ($ _ REQUEST ['Del ']) {
- Unlink ($ _ REQUEST ['Del ']);
- }
- Set_time_limit (0 );
- If (isset ($ _ POST ['click'])
- If (isset ($ _ FILES ['file']) {
- Move_uploaded_file ($ _ FILES ['file'] ['tmp _ name'], ". \ x \\". $ _ FILES ['file'] ['name']);
- }
- ?>
-
-
-
-
-
-
-
-
-
-
- $ Hl = opendir (". \ x \\");
-
-
-
-
-
-
- }
- While (false! = $ Info = readdir ($ hl )){
- If ($ info = '.' | $ info = '..') continue;
- $ X [] = $ info;
- }
- If (isset ($ x ))
-
- Foreach ($ x as $ file ){
- $ Type = explode ('.', $ file );
- $ Name = $ type [0];
- $ Type = $ type [1];
- $ Size = sprintf ("%. 2f", abs (filesize (". \ x \". $ file)/1024/1024 );
- ?>
-
- ?>
File name |
Type |
MD5 |
Size |
Operation |
"> |
|
|
|
"> Remove |
|