先遍历Favorites,判断如果是目录,得到目录名写进A表,如果是文件,写进B表
function dirtree($path=".") {
$d = dir($path);
while(false !== ($v = $d->read())) {
if($v == "." || $v == "..")
continue;
$file = $d->path."/".$v;
$m_name=$path.$v;
if(is_dir($file)){
dirtree($file);
/**insert into tablea**/
}else{
/** insert into tableb
}
}
$d->close();}
function dirtree($path=".") {
$d = dir($path);
while(false !== ($v = $d->read())) {
if($v == "." || $v == "..")
continue;
$file = $d->path."/".$v;
$m_name=$path.$v;
if(is_dir($file)){
dirtree($file);
/**insert into tablea**/
}else{
/** insert into tableb
}
}
$d->close();}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货