php 读取文件夹文件函数
function GetFoldersAndFiles( $resourceType, $currentFolder )
{
// Map the virtual path to the local server path.
$sServerDir = ServerMapFolder( $resourceType, $currentFolder, 'GetFoldersAndFiles' ) ;
// Arrays that will hold the folders and files names.
$aFolders = array() ;
$aFiles = array() ;
$oCurrentFolder = opendir( $sServerDir ) ;
while ( $sFile = readdir( $oCurrentFolder ) )
{
if ( $sFile != '.' && $sFile != '..' )
{
if ( is_dir( $sServerDir . $sFile ) )
$aFolders[] = '
else
{
$iFileSize = @filesize( $sServerDir . $sFile ) ;
if ( !$iFileSize ) {
$iFileSize = 0 ;
}
if ( $iFileSize > 0 )
{
$iFileSize = round( $iFileSize / 1024 ) ;
if ( $iFileSize
}
$aFiles[] = '
}
}
}
// Send the folders
natcasesort( $aFolders ) ;
echo '
foreach ( $aFolders as $sFolder )
echo $sFolder ;
echo '' ;
微信分销商城电脑手机三合一是以php+MySQL进行开发的微信商城分销系统源码。安装步骤:1、打开:网址/diguo/index.php 用户密码是admin 123456 登录进去配置数据库信息。2、用帝国还原恢复数据库.3、修改data文件夹里的config.php (data/config.php)数据库配置信息4、登录网站后台,网址:域名/admin/index.php 后台帐号是:
// Send the files
natcasesort( $aFiles ) ;
echo '
foreach ( $aFiles as $sFiles )
echo $sFiles ;
echo '' ;
}










