In this tutorial we will learn to list all the files and directories in the given directory name.
In this tutorial we will learn to list all the files and directories in the given directory name.
<?php
$file=opendir("c:/apache-tomcat-6.0.16");
while($a=readdir($file))
{
echo $a."<br>";
}
?>
Output
.
..
bin
conf
lib
LICENSE
logs
NOTICE
RELEASE-NOTES
RUNNING.txt
spring1.war
temp
webapps
work