亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Open file directory operation

To open the file directory, you must first obtain the file directory:

Add a hyperlink to the filemanager_html.php code to send a get request:

微信圖片_20180301163140.png

Code display:

<?php
<!--    循環(huán)輸出目錄列表-->
    <?php
    foreach ($file_list['dir'] as $v):
    ?>
    <tr><td><img src="./img/dir.png"><?php echo $v['filename'];?></td>
        <td><?php echo $v['filename'];?></td>
        <td>-</td>
        <td><a href="?path=<?php echo $v['filepath'];?>">打開</a></td>
    </tr>
    <?php endforeach;?>

Add the following code before the getFileList() function to obtain the get request To determine the path:

<?php
//獲取文件路徑參數(shù)
$path=isset($_GET['path'])?$_GET['path']:'.';
//保存待處理文件名
$file='';
//判斷$path路徑是否存在
if(is_file($path)){
    //如果是文件,則取出路徑中的文件名
    $file=basename($path);
    //將$path轉換為目錄
    $path=dirname($path);
}elseif (!is_dir($path)){
    //既不是文件也不是目錄,則程序停止
    die('無效的文件路徑參數(shù)');
}

Clicking on the directory folder will open the corresponding file directory and enter the next level directory

Directory display:

微信圖片_20180301164040.png

##Display before clicking:


## Click to display:

微信圖片_20180301163813.png

Continuing Learning
||
<?php echo "打開文件夾操作"
submitReset Code