Einzelnen Beitrag anzeigen
Alt 07.01.2004, 18:24   #4
käptn
Inventar
 
Registriert seit: 04.11.2001
Alter: 45
Beiträge: 2.150


Standard

PHP-Code:
$html '/gallery/';
$path '/www/example.com/html' $html;
$dir  realpath($path $_GET['event']);
if (!
strstr($dir$path)) {
    echo 
'<h1>verpiss dich!</h1>';
    exit;
}
if (!
is_dir($dir)) {
    echo 
'Kein solches Verzeichnis!';
    exit;
}
$h dir($dir);
while (
$entry $h->read()) {
    if (
is_file($dir DIRECTORY_SEPARATOR $entry) && 
        
$entry{0} != '.') {
        
        echo 
'<img src="'$html $_GET['event'] .
            
'/' $entry .'" />' "\n";
    }
}
$h->close(); 
...ungetested...

~
____________________________________
LOL - Mein erstes Post im Programmier Forum

MACINTOSH - Most Applications Crash, If Not The Operating System Hangs
käptn ist offline   Mit Zitat antworten