Код: Выделить всё
\”Код: Выделить всё
\”Код: Выделить всё
if ($savefile!="") {
$fp=fopen($file,"w");
fwrite($fp,$savefile);
fclose($fp);}
$lines=file($file);
$lng=count($lines);
echo "<form action=\"\" method=\"post\" name=\"pform\"><textarea name=\"savefile\" rows=\"30\" cols=\"60\">";
for ($i=0;$i<$lng;$i++) {
echo $lines[$i];}
echo "</textarea><br><input type=\"submit\" value=\"Сохранить\"></form>";Решение:magic_quotes_gpc boolean
Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. If magic_quotes_sybase is also on, a single-quote is escaped with a single-quote instead of a backslash.
Note: magic_quotes_gpc is ON by default.
А я и не знал даже, спасиб за совет. Значит будем стрипслешами.Не останешься: слеши слешуются тоже, поэтому при расслешивании вместо двух слешей подряд останётся один, как и полагается.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 0 гостей
|
|
|