All pastes #341461 Raw Edit

Mine

public php v1 · immutable
·published 2007-02-05 17:38 UTC
rendered paste body
<?header("Content-type: text/html; charset=windows-1254");$dizin = "hastane";$ddizin = $dizin;$dizin = opendir($dizin);function tipBul ($dosya) {	$dosya = explode(".",$dosya);	$eleman = count($dosya)-1;	return $dosya[$eleman];}while ($dosya = readdir($dizin)) {	if ($dosya != "." || $dosya != "..") {		if (tipBul($dosya) == "php" || tipBul($dosya) == "html") {			if ($dosya) {				$icerik = file_get_contents($ddizin."/".$dosya);				$degistir = preg_replace("'(index.html)'i","index.php",$icerik);				$degistir = preg_replace("'file:\/\/.*\/web\/'i","",$icerik);				$harf = array("/ö/","/ç/","/&#351;/","/&#287;/","/ü/","/&#305;/");				$degis = array("o","c","s","g","u","i");				$dosya = preg_replace($harf,$degis,$dosya);				$ac = fopen("yeni/".$dosya,"w");				if (fwrite($ac,$degistir)) {					echo "<b>$dosya</b> dosyas&#305;nda gerekli i&#351;lemler yap&#305;ld&#305;. Linkler PHP uzant&#305;l&#305; çevrildi<br>";				} else {					echo "de&#287;i&#351;tirilemedi<br>";				}			} 		}	}}closedir($dizin);?>