您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php 读取目录文件夹列表程序

2025/12/14 9:16:55发布16次查看
php 读取目录文件夹列表程序
function getfolders( $resourcetype, $currentfolder )
{
 // map the virtual path to the local server path.
 $sserverdir = servermapfolder( $resourcetype, $currentfolder, 'getfolders' ) ;
 // array that will hold the folders names.
 $afolders = array() ;
 $ocurrentfolder = opendir( $sserverdir ) ;
 while ( $sfile = readdir( $ocurrentfolder ) )
 {
  if ( $sfile != '.' && $sfile != '..' && is_dir( $sserverdir . $sfile ) )
   $afolders[] = '' ;
 }
 closedir( $ocurrentfolder ) ;
 // open the folders node.
 echo ;
 natcasesort( $afolders ) ;
 foreach ( $afolders as $sfolder )
  echo $sfolder ;
 // close the folders node.
 echo ;
}
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product