1.获取文件列表
$dir = APPLICATION_PATH.'/modules/shipment/views/template';
$handle = opendir($dir);
$path_arr = array();
if($handle){
while (($fl = readdir($handle)) != false){
$temp = $dir.DIRECTORY_SEPARATOR.$fl;
//如果不加 $fl!='.' && $fl != '..' 则会造成把$dir的父级目录也读取出来
if(!in_array($fl,array('.','..','.svn'))){
$path_info = pathinfo($fl);
$path_arr[] = $path_info['filename'];
}
}
}