All pastes #351189 Raw Edit

php dirlist

public php v1 · immutable
·published 2007-02-12 00:31 UTC
rendered paste body
<?echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n";echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">' . "\n";echo '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">' . "\n";echo '<head>' . "\n";echo '<meta name="vim" content="xxx" />' . "\n";echo '<title>lix pix</title>' . "\n";echo '<link rel="stylesheet" type="text/css" media="screen" href="html.css" />' . "\n";echo '</head>' . "\n";echo '<body>' . "\n";//konyvtar$dir = ".";$dh  = opendir($dir);//nem listazott konyvtarak$forbidden = array('pina', 'fasz');//beolvassa az opendir kimenetetwhile (false !== ($filename = readdir($dh))) {    //ha nem . es nem .. es konyvtar    if ($filename != '.' && $filename != '..' && is_dir($filename) ){        $files[] = $filename;    }}sort($files);sort($forbidden);//kiszedi a listabol ami nem kellforeach ($files as $kelle) {    $jo = true;    foreach ($forbidden as $nemkell) {        if ($kelle == $nemkell)            $jo = false;    }    if ($jo)        echo '<p><strong><a href="http://photo.litch.eu/'. "$kelle" . '"/>' . "$kelle" . "</strong></p>" . "\n";}echo '<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a></p>' . "\n";echo '</body>' . "\n";echo '</html>' . "\n";?>