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开发的php订单管理系统,她的特点如下: 产品特色: 支持商品规格、订单短信提醒,订单提交限制,站外调用, 批量发货/导出,数据报表,物流轨迹、免签支付等。 1、高度开源:除核心授权文件外全部开源,二开方便。 2、分布式部署:支持分布式部署、支持数据库读写分离。 3、第三方存储:支持附件腾讯云、阿里云、七牛云存储
22
// Send the files
natcasesort( $aFiles ) ;
echo '
foreach ( $aFiles as $sFiles )
echo $sFiles ;
echo '' ;
}
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号