23 lines
360 B
PHP
23 lines
360 B
PHP
|
<?php
|
||
|
function list_file ( $dir )
|
||
|
{
|
||
|
if ( $dir [ strlen( $dir ) - 1 ] != '/' ){
|
||
|
$dir .= '/';
|
||
|
}
|
||
|
$nDir = opendir( $dir );
|
||
|
while ( false !== ( $file = readdir( $nDir ) ) )
|
||
|
{
|
||
|
if ( $file != "." AND $file != ".." ){
|
||
|
if ( !is_dir( $dir . $file ) ){
|
||
|
$files [] = $file;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
closedir( $nDir );
|
||
|
return $files;
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
?>
|