In PHP if you want to list the files existing in the current directory, this is how you do it:
<?php
$dir=getcwd();
$dirhandle=opendir($dir);
while(false!==($thisfile=readdir($dirhandle)))
{
print $thisfile . “<br />”;
}
How to wisdom from across the Internet — want to know how to do something? You may find the solution here.
Home / Uncategorized / How to get the current directory listing in PHP
Previous post: How to learn a foreign language for free
Next post: How to create a photorealistic reflection in Photoshop