Jump to content

PHP-Script creates lots of files over 200 MB, why?


p3ng3l

Recommended Posts

Hi phpfreaks  :D

 

I have a problem with my "database".

This code:

<?php
echo
"<html><body>
";
    $mitteilung = htmlspecialchars($_GET["mitteilung_frm"]);
    if ($mitteilung != "")
    	{
    	rename ("fb", "fb2");
    	$feedback = fopen("fb","a");
    	fputs($feedback,     $mitteilung."\n");
   $feedback2 = fopen ("fb2","r");
   while (!feof($feedback2))
	    {
    fputs ($feedback, fgets($feedback2));
    }
   fclose($feedback);
   fclose($feedback2);
}

$fb = fopen("fb","r");
    while (!feof($fb))
{
$comment = fgets($fb);
list ($mitteilung_out)  = split("////", $comment);
if ($mitteilung_out != "")
{
print "<br>".$mitteilung_out."\n";
}
}
echo"	</body></html>";
?>

creates after some inputs (200-300) files with confusing content over 200 MB ^^

I dont know why, i think there is a bug in this code, i hope you can help me!

All what i need is a get-url that save mitteilung_out into some lists fb/fb2.

But i dont know how to fix and it would be nice if someone can he me, thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.