function
file_list(
$path
){
$num
= 0;
if
(
$handle
= opendir(
$path
)){
while
(false !==
$file
=readdir(
$handle
)){
if
(
$file
!='.' &&
$file
!='..'){
if
(
is_dir
(
$path
. '/'.
$file
)){
file_list(
$path
. '/'.
$file
);
}
else
{
if
(preg_match (
"/.php$/"
,
$file
)){
file_content_replace(
$path
.'/'.
$file
, 'PPCART_TEXT_SUCCESS', '***********');
echo
'++++++++++'.
$file
.'++++++++++<br />';
}
else
echo
'------非PHP文件------<br />';
$num
++;
}
}
}
closedir
(
$handle
);
}
}
function
myScanDir(
$path
) {
$result
= scandir(
$path
);
foreach
(
$result
as
$re
) {
if
(
$re
== '.' ||
$re
== '..')
continue
;
$dir
=
$path
.'/'.
$re
;
if
(
is_dir
(
$dir
)) {
showDir(
$dir
);
continue
;
}
echo
$dir
.
"<br />"
;
}
}