Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi !
i am a starter with PHP and i d very grateful if someone of you could give me a hand please.
i have the following code for a local directory :Code: Select all
<?php
echo '<h1>Index of /adult/</h1>';
echo '<ul>';
echo '<li><a href="http://www.doncasa.com/fotos/BA1528
"> Parent Directory</a></li>';
$dir = scandir('.');
$files = count( $dir );
for ( $i = 0; $i < $files; $i++ )
{
if ( is_file($dir[$i]) && strlen( $dir[$i] ) <= 36 && ( strstr( strtolower( $dir[$i] ), '.htm' ) || strstr( strtolower( $dir[$i] ), '.html' ) || strstr( strtolower( $dir[$i] ), '.php' ) ) )
echo "<li><a href=\"$dir[$i]\">$dir[$i]</a></li><br>";
if ( is_dir($dir[$i]) && $dir[$i] != "." && $dir[$i] != ".." && $dir[$i] != "adult" )
echo "<li><a href=\"$dir[$i]\"/>$dir[$i]/</a></li><br>";
}
echo '</ul>';
?>how do i ahve to do this ? on the PHP i didnt view anything specified .......
thanks for your help
greetings from barcelona, spain
Christian
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]