| How to find file and directory |
|
|
<?php
/*
function that reads directory content and
returns the result as links to every file in the directory
also it display type whether its a file or directory
*/
function DirDisply() {
$TrackDir=opendir(".");
echo "";
while ($file = readdir($TrackDir)) {
if ($file == "." || $file == "..") { }
else {
echo "";
}
}
echo "$file";
closedir($TrackDir);
return;
}
/*Current Directory Contain
Following files and Sub Directories*/
DirDisply();
?>
The above script helps you to find whether the listed directories are files or a directories.
|
| Php - Script to list directory content |
| The topic on Php - How to find file and directory is posted by - Maha |
Hope you have enjoyed, Php - How to find file and directory . Thanks for your time.
|