Home »
Imported messages »
comp.lang.php »
Fatal error!
Re: Fatal error! [message #180877 is a reply to message #180876] |
Sun, 24 March 2013 12:04 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 3/24/2013 6:43 AM, gb wrote:
>
> Hi,
> I'm a newbye of PHP, why it gives me this error:
>
> Fatal error: Maximum execution time of 60 seconds exceeded in
> C:\xampp\htdocs\ord.php on line 30
>
> Is there a time limits?
>
> This is the script that run locally on xampp:
>
> <?php
>
> $nmin_rand=1;
> $nmax_rand=100000;
> $l_arr=100000;
> $n=0;
>
> $num_estr=array();
> $num_copia=array();
>
> //inizializza array lungo $l_arr
>
> echo "<br>";
> for ($i=0; $i<$l_arr; $i++){
>
> $num_estr[$i]=rand($nmin_rand,$nmax_rand);
>
> echo " ".$num_estr[$i]." ";
>
> }
>
>
> // Ordinamento
>
> $flag=true;
>
> do{
> $flag=false;
>
> for ($i=0; $i<$l_arr-1; $i++)
> if ($num_estr[$i]>$num_estr[$i+1]){
>
> $temp=$num_estr[$i];
> $num_estr[$i]=$num_estr[$i+1];
> $num_estr[$i+1]=$temp;
>
> $flag=true;
>
> $n++;
>
> }
>
> }while($flag);
>
> //stampa array ordinato lungo $l_arr
>
> echo "<br>";
> for ($i=0; $i<$l_arr; $i++){
>
> echo " ".$num_estr[$i]." ";
>
> }
>
> echo "<br>Numero scambi : ".$n;
>
> ?>
>
http://www.lmgtfy.com/?q=%22Fatal+error%3A+Maximum+execution+time%22+php
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Goto Forum:
Current Time: Fri Nov 22 16:10:47 GMT 2024
Total time taken to generate the page: 0.04605 seconds