Տակ.
Քո ասած ձևով արեցի, չստացվեց, անընդհատ էռռոռներ էր բերում, իմ տարբերակն ու քոնը մի փոքր միքսեցի նոր ստացվեց...
Ահա կոդը՝
$h = fopen("message/$filename","w+");<?php
$filename = "message_" .$id. "htm";
$id = "1";
while(file_exists("message/$filename"))
{
$id++;
$filename= "message_".$id.".htm";
}
$h = fopen("message/$filename","w+");
$text = '$_POST["result"]; echo $text';
if (fwrite($h,$text))
echo "";
else
echo "Everything is okay";
fclose($h)
?>
Էս կոդը ես մինչև while(file_exists("message/$filename")) ն էի գրում, դրա պատճառով էլ խառնովում էր սաղ իրար![]()
Էջանիշներ