Hi all
I need a php script that can access a folder on the server to list all the files in the folder. While trying to get a solution, I found this script that can list folders in the wamp index.php-file:
[code=php]<?php
$projectsListIg nore = array ('.','..');
$handle=opendir (".");
$projectContent s = '';
while ($file = readdir($handle ))
{
if (is_dir($file) && !in_array($file ,$projectsListI gnore))
{
$projectContent s .= '<li><a href="'.$file.' ">'.$file.' </a></li>';
}
}
closedir($handl e);
if (!isset($projec tContents))
$projectContent s = $langues[$langue]['txtNoProjet'];
?>[/code]
it should also link towards the files that get listed
Can someone please help me
Merry Christmas to all
I need a php script that can access a folder on the server to list all the files in the folder. While trying to get a solution, I found this script that can list folders in the wamp index.php-file:
[code=php]<?php
$projectsListIg nore = array ('.','..');
$handle=opendir (".");
$projectContent s = '';
while ($file = readdir($handle ))
{
if (is_dir($file) && !in_array($file ,$projectsListI gnore))
{
$projectContent s .= '<li><a href="'.$file.' ">'.$file.' </a></li>';
}
}
closedir($handl e);
if (!isset($projec tContents))
$projectContent s = $langues[$langue]['txtNoProjet'];
?>[/code]
it should also link towards the files that get listed
Can someone please help me
Merry Christmas to all
Comment