File list of a folder
<?php
//folder to check
$folder = “C:/xampp/htdocs/xampp/wordpress/wp-includes”;
$handle = opendir($folder);
//loop through the directory
while ($file = readdir($handle))
{
$files[] = $file;
}
closedir($handle);
//display every file in folder
foreach ($files as $file)
{
echo “<a href=$folder$file>$file</a>”.”<br />”;
}
?>
Related posts:
- Delete files that are over 7 days old <?php $dir = ‘/path/to/dir’; if ($handle = opendir($dir)) { ...
- Manual Installation Tutorial for PHP 5 on IIS 5.1 (Windows XP Pro) Before we begin any installation steps, the first thing we...
- create a gzip file this example backs up the index.php as a gzip file...
- FTP file upload example upload a single file to a FTP server // FTP...
Related posts brought to you by Yet Another Related Posts Plugin.



















