Home >
Article > Backend Development > PHP displays the file where the current file is located and all the files in the folder, and expands it in a tree shape_PHP tutorial
PHP displays the file where the current file is located and all the files in the folder, and expands it in a tree shape_PHP tutorial
WBOYOriginal
2016-07-13 17:18:45728browse
$path = "./";
function createDir($path = '.')
{
if ($handle = opendir($path))
{
echo "
";
while (false !== ($file = readdir($handle)))
{
if (is_dir($path.$file) && $file != '.' && $file !='..')
http://www.bkjia.com/PHPjc/621624.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/621624.htmlTechArticle$path = "./"; function createDir($path = '.') { if ($handle = opendir($path)) { echo " "; while (false !== ($file = readdir($handle))) { if (is_dir($path.$file) $file != '.' $file...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn