21,886
社区成员
发帖
与我相关
我的任务
分享
function ck($a)
{
$b = explode('_',$a);
$d='';
foreach($b as $c)
{
$d = $d.ucfirst($c);
}
return $d;
}
$PostPath = $_GET["path"];
define('LOG_ROOT', '../../log');
$PostPath = preg_replace('#(/[^/]+)?/\.\.#i', '', $PostPath);
$path = LOG_ROOT . $PostPath;
function GetDirInfo($path)
{
global $PostPath;
$re="";
if (is_dir($path))
{
//echo $path;
$dh = scandir($path);
if (!empty($dh)) {
$re= "<table id='test'>";
$re.="<tr>";
$re.="<td>";
$re.= "<ul>";
if($path != LOG_ROOT) {
$re.= "<li><img src='../file/image/folder.gif'><a href='log.php?path=". urlencode($PostPath.'/..') . "' style='font-size:15px;'>..</a></li>";
}
foreach ($dh as $file)
{
if ($file != '.' && $file != '..') {
if(is_dir($path.'/'.$file)) {
$re .= "<li><img src='../file/image/folder.gif'><a href='log.php?path=". urlencode($PostPath.'/'.$file) . "' style='font-size:15px;'>" . $file. "</a>";
} else {
$re .= "<li><img src='../file/image/sheet.gif'><a href='head.php?path=$path&file=$file'>" . $file. "</a>";
}
}
$re .= "</li>";
}
$re .= "</ul>";
$re.="</td>";
$re.="</tr>";
$re.="</table>";
}
}
return $re;
}