admanage - performance enhanced search technology

PHP problem

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 2 posts

Joined: May 2008

i have solved this problem i need to put a special icon for each type of file how i must do it?i did it for directory

<?php
echo "<form method=post>";
echo
"<input type=text name=dirname>";
echo
"<input type=submit value='Show file' name=knopka>";
echo
"</form>";

$d=opendir($_REQUEST[dirname]);

while ( ($str=readdir($d))!=NULL ) {

if ( is_dir("$_REQUEST[dirname]".$str) ) { echo "<img src=folder.bmp> $str";}

echo "<br>";
}

closedir($d);
?>

dk01's picture

He has: 517 posts

Joined: Mar 2002

Welcome to the forums!

Probably the easiest way is to use a premade script (for security's sake). If you'd like to do this, check out CeleronDude's Indexer 2.0 Script here:

http://www.celerondude.com/downloads/indexer20.zip

And for a demo of the output go here:
http://www.celerondude.com/images/

Its super easy to use as you just drop index.php into the directory you want to explore.