FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Fatal error!
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Fatal error! [message #180876] Sun, 24 March 2013 10:43 Go to previous message
gb is currently offline  gb
Messages: 1
Registered: March 2013
Karma:
Junior Member
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;

?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: question about class getters
Next Topic: Seeking help with relative and absolute paths
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 15:45:55 GMT 2024

Total time taken to generate the page: 0.06338 seconds