#phpinfo(); $lpath= getcwd(); #$lpath= '/home/profesores/valdemar/www'; $d = dir($lpath); $webPath=$_SERVER['REDIRECT_URL']; echo "
Facultad de Ciencias, UASLP.
"; echo "Contenido de archivos para el directorio:
" . $webPath ; echo "
\n"; #echo "Path: " . $d->path . "(" . $lpath . ")" . "
\n"; echo "
\n\t
Tipo
Descargar/visitar
\n"; while (false !== ($entry = $d->read())) { if ( ($entry[0] != ".") == true ){ $DIRC=false; if (is_dir($lpath . "/" . $entry) == true) $DIRC=true; echo "
"; if ( $DIRC == true){ echo "
[directorio]
"; } else { echo " [archivo]"; } echo "
"; if ( $DIRC == true) echo "
"; echo $entry . "
"; echo "
\n"; } } echo "
"; $d->close(); ?>