- 论坛徽章:
- 0
|
让这个帖子沉吧!!
没什么意思:
function strr($dir) {
echo 'path:'.$dir.'<br />';
$f = opendir($dir);
while (($file = readdir($f)) !== false) {
if($file != '.' && $file != '..') {
if(is_dir($dir.'/'.$file)) {
echo 'folder:';
echo '<a href="1.php?path='.$dir.'/'.$file.'" >'.$dir.'/'.$file.'</a>';
echo '<br />';
$file = $dir.'/'.$file;
strr($file);
} else {
$s = file_get_contents($dir.'/'.$file);
$s = str_replace('php3', 'php', $s);
// echo $s;
file_put_contents($dir.'/'.$file,$s);
echo 'file:'.$dir.'/'.$file.'<br />';
}
}
}
closedir($f);
} |
|
|