PHP:开发类似“查看目录文件”的程序
大家讲道理
大家讲道理 2017-04-10 14:40:56
0
2
344

想要一个开发类似于上图所示的界面,可以帮忙推荐下相关插件(一般是使用jquery吧)吗?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
迷茫

Javascript部分用Tree之类的插件。

PHP部分用SPL迭代器,网上给你找了段说明性质的代码。

try{
    /*** class create new DirectoryIterator Object ***/
    foreach ( new DirectoryIterator('./') as $Item )
    {
        echo $Item . '|' . $Item->getSize() . '|' . $Item->getATime() 
.'|' . $Item->getMTime() .'|' . $Item->isDir() .  '<br>';
    }
}
    /*** if an exception is thrown, catch it here ***/
catch(Exception $e){
    echo 'No files Found!<br />';
}

http://www.php.net/manual/zh/class.directoryiterator.php

左手右手慢动作

js端推荐:ztree

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template