Return to the previous directory

Add a hyperlink in front of the file list that displays a return to the previous page:

<?php
<a href="?path=<?php echo $path;?>&a=prev">返回上一级目录</a>

Call getFileList( in filemanager.php ) Add the following code before the function:

<?php
//获取操作参数
$action=isset($_GET['a'])?$_GET['a']:'';
switch ($action){
    //返回上一级目录
    case 'prev':
        $path=dirname($path);
        break;
    //其他操作...
}

The effect is shown below:

微信图片_20180301165312.png微信图片_20180301165315.png



##

Continuing Learning
||
<?php echo "返回上一页";
submitReset Code