echo "服务器真实地址如下:<br />\n"; echo "当前文件路径: ========> " . __FILE__ . "<br />\n"; echo "当前目录路径: ========> " . $path . "<br />\n"; echo '<br>'; echo "浏览路径: [<a href=\"" . $_SERVER['PHP_SELF'] . "{$multiple}\" target=_blank>打开浏览</a>] =====> " . $_SERVER['PHP_SELF'] . "<br />\n"; echo '<br>'; } echo "浏览路径: [<a href=\"?path=" . urlencode(___realpath($path . "/..")) . "{$multiple}\">上级目录</a>] " . ___shortpath(___realpath($path)); if ($multiple != null) { echo " [<a href=\"./multiple.php?type={$_GET['multiple']}&gopath=" . urlencode($path) . "\">选定</a>|<a href=\"./dlym.php?path=" . urlencode($path) . "\">关闭</a>]"; } echo " [<a href=\"{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}&logout\">注销</a>]\n"; echo '<br>'; echo '<br>'; echo "\n</div>\n"; if (($data = $filesystem->getpath()) === false) { echo "<div class=\"error\">抱歉,系统无法获取对应目录内容!</div>\n"; } elseif ($data === null) { echo "<div class=\"error\">抱歉,这是一个无内容的空目录哦!</div>\n"; echo "<div class=\"love\">\n"; echo "<form action=\"multiple.php?getcwd=" . urlencode($path) . "\" method=\"POST\">"; echo "<select name=\"type\">\n"; echo "<option value=\"list\">文件清单(管理)</option>\n"; echo "<option value=\"move\">移动文件(多选)</option>\n"; echo "<option value=\"copy\">复制文件(多选)</option>\n"; echo "<option value=\"pkzip\">压缩文件(多选)</option>\n"; echo "<option value=\"chmod\">权限修改(多选)</option>\n"; echo "<option value=\"delete\">删除文件(多选)</option>\n"; echo "<option value=\"create\">建立数据(目录)</option>\n"; echo "<option value=\"upload\">本地远程(上传)</option>\n"; echo "<option value=\"addlist\">文件清单(加入)</option>\n";
<?php require "config.php"; if (!isset($_GET['path'])) { header("Location: ./404.php"); exit; } elseif (($path = trim($_GET['path'])) == "") { header("Location: ./404.php"); exit; } elseif (!is_file($path) || !is_readable($path)) { header("Location: ./404.php"); exit; } else { $myfs = new filesystem($path); $info = $myfs->getpath(); header("Content-Type: application/force-download"); header("Content-Disposition: attachment; filename=" . ___basename($path)); header("Accept-Ranges: bytes"); header("Content-Length: " . $info['size']); $fp = fopen($path, "rb"); while (!feof($fp)) { echo fread($fp, 4096); } fclose($fp); }
<?php require "config.php"; if (!isset($_GET['path'])) { header("Location: ./404.php"); exit; } elseif (is_dir($path = ___realpath(trim($_GET['path'])))) { header("Location: ./404.php"); exit; } $fs = new filesystem($path); xhtml_head(___shortpath($path)); if (!($data = $fs->getpath($path))) { echo "<div class=\"error\">\n"; echo "[<a href=\"./index.php?path=" . urlencode($getcwd) . "\">返回目录</a>]\n"; echo "</div>\n"; } else { echo "<div class=\"love\">\n"; echo "<a href=\"./index.php?path=" . urlencode(dirname($path)) . "\">[返回]</a>\n<br/>"; echo "文件名称:" . ___basename($path) . "<br />\n"; echo "文件大小:" . ___filesize($data['size']) . "<br />\n"; echo "所有者ID:{$data['uid']}<br />\n"; echo "所有组ID:{$data['gid']}<br />\n"; echo "上次访问:" . gmdate("Y-m-d H:i:s", $data['atime'] + TIME) . "<br />\n"; echo "上次修改:" . gmdate("Y-m-d H:i:s", $data['mtime'] + TIME) . "<br />\n"; echo "上次改变:" . gmdate("Y-m-d H:i:s", $data['ctime'] + TIME) . "<br />\n"; echo "</div>\n"; echo "<div class=\"like\">\n"; echo "爱特解压<a href=\"./index.php?new&path=" . urlencode(dirname($path)) . "&multiple=unpackdir&getcwd=" . urlencode($path) . "\">目标目录</a>\n"; echo "</div>\n"; echo "<div class=\"love\">\n";