Posted by:
jim_mccann
(---.3.ku-graz.surfer.at)
Hi!
The fastest way would be to simply change this part of code:
<?php
// Affichage de la liste des dossiers non énumérés plus haut ( = projets ).
$list_ignore = array ('.','..','exemples','phpmyadmin','sqlitemanager');
$handle=opendir("."
$msg = $langues[$langue]['txt_no_projet'];
while ($file = readdir($handle)) {
if (is_dir($file) && !in_array($file,$list_ignore)) { //HERE IS THE LINE WE HAVE TO CHANGE
$msg = '';
echo '<a class="ditem" href="'.$file.'"><img src="dossier.gif" alt="image dossier" /> '.$file.'</a>';
}
}
closedir($handle);
echo $msg;
?>
to this:
<?php
// Affichage de la liste des dossiers non énumérés plus haut ( = projets ).
$list_ignore = array ('.','..','exemples','phpmyadmin','sqlitemanager');
$handle=opendir("."
$msg = $langues[$langue]['txt_no_projet'];
while ($file = readdir($handle)) {
if (!in_array($file,$list_ignore)) { //CHANGED LINE
$msg = '';
echo '<a class="ditem" href="'.$file.'"><img src="dossier.gif" alt="image dossier" /> '.$file.'</a>';
}
}
closedir($handle);
echo $msg;
?>
After you changed
if (is_dir($file) && !in_array($file,$list_ignore))
to
if (!in_array($file,$list_ignore))
files and folders will be listed inside the localhost index page.
Notice that this is not the clean, good way to do it but it's a start for you.
.
Wamp é tres bien ;-) Greetz
Edited 1 time(s). Last edit at 05/07/2008 08:47AM by jim_mccann.