Re: Maximum execution time of 30 seconds exceeded...

From: Date: Thu, 03 May 2001 21:14:13 +0000
Subject: Re: Maximum execution time of 30 seconds exceeded...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51245@lists.php.net to get a copy of this message
Never tried it though! But what if you try this: <form name=myform method=post action="<?=$PHP_SELF?>"> <? if (!isset($i) $i = 0; else $i++; ?> <input type=hidden name=i value=<?=$i?>> </form> <? $lines = join("", file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dsp&kbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", "w"); fwrite($fp, $lines, strlen($lines)); fclose($fp); ?> <script> if (myform.i.value > 1234) alert('reached max! script finished'); // stop submitting! else myform.submit(); // submit the form! </script> by this you're giving each file a life time of 30secs max! meanwhile this trick can save solve your problem! -elias www.eassoft.cjb.net "Kraa de Simon" <Simon.de.Kraa@icl.nl> wrote in message news:C1EBEEBBB842D411B4120000949A1F5875868B@wwmessd135... > Hi, > > Any ideas how to get by the following error? > > Fatal error: Maximum execution time of 30 seconds exceeded in c:\program > files\nusphere\apache\htdocs\test.php on line 8 > > <? > for($i=1;$i<=99999;$i++) > { > $lines = join("", > file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web > kb.html?TAB=dsp&kbid=' . $i)); > > $fp = fopen ($DOCUMENT_ROOT . "/" . $i . ".html", > "w"); > fwrite($fp, $lines, strlen($lines)); > fclose($fp); > } > ?> > > Met vriendelijke groet / With kind regards, > > Simon de Kraa > ICL Logistic Systems > mailto:Simon.de.Kraa@icl.nl > > --- > > Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b > SCO UnixWare 7.1.1, Progress 9.1a11 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#51245) next »