Homemade super simple PHP network hard disk
Release: 2016-07-25 09:04:59
Original
1168 people have browsed it
PHP+HTML混写的超简易网络硬盘
- disk online
- .font {
- font-family: Consolas;
- color: #369;
- font-size: 12px;
- }
-
- .box {
- font-family: Consolas;
- font-size: 13px;
- color: #369;
- border: 1px solid #000;
- }
-
- .btn {
- font-family: "微软雅黑";
- font-size: 12px;
- color: #FFF;
- background-color: #369;
- border: 1px solid #666;
- width: 80px;
- }
-
-
- /*
- * code written by mot
- * 2012 - 5 - 20
- *在根目录下面新建一个 名字为 x 的文件夹 存放上传文件
- */
- if(isset($_REQUEST['del'])){
- unlink($_REQUEST['del']);
- }
- set_time_limit(0);
- if(isset($_POST['button']))
- if(isset($_FILES['file'])){
- move_uploaded_file($_FILES['file']['tmp_name'], ".\x\".$_FILES['file']['name']);
- }
- ?>
-
-
-
-
-
文件名 |
-
类型 |
-
MD5 |
-
大小 |
-
操作 |
-
- $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);
- ?>
-
-
=$name ?> |
-
=$type ?> |
-
=md5_file(".\x\".$file)?> |
-
=$size." MB" ?> |
-
">remove |
-
- }
- ?>
-
-
复制代码
|
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
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31