IzKuFeLiQqQqQ
Registered
здравейте направих си това кодче за търсене и замяна на дълъл текст
но когато се опитах да променя един текст ми изписа
PHP:
<form method="post">
<textarea name="t" cols="70" rows="15"></textarea><br>
<textarea name="r" cols="70" rows="15"></textarea><br>
<input type="submit" name="s" value="замени"/>
</form>
<?php
if(isset($_POST['s'])) {
$t = htmlspecialchars($_POST['t']);
$r = htmlspecialchars($_POST['r']);
$path = './';
function procheti($path) {
if (is_dir($path)) {
$dir= opendir($path);
while (($file = readdir($dir))!=FALSE) {
if ($file != '.' and $file != '..') {
if (is_dir($path.$file.'/')) {
$path2=$path.$file.'/';
procheti($path2);
} else {
$get = file_get_contents($path.$file);
$rep = str_replace($t,$r,$get);//РЕД 24
$put = file_put_contents($path.$file,$rep);
}
}
}
closedir($dir);
}
}
procheti($path);
}
?>
въпроса ми е как да увелича тея байтовете че да мога да променя текста...Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12717113 bytes) in /home/sunnymp3/public_html/serep.php on line 24