注册 登录
编程论坛 PHP技术论坛

Fatal error:Maximum execution time of 30 seconds exceeded in C:\wamp\www\text\in

szchina 发布于 2013-03-07 10:01, 2609 次点击
Fatal error:Maximum execution time of 30 seconds exceeded in C:\wamp\www\text\index.php on line18

<!doctype html>
<html>
<head><title>counter</title></head>

<?php
    @$f=fopen("piccounter.txt", "r") or die("Unable to open file!");
    $num=fread($f, filesize("piccounter.txt"));
    $num++;
    fclose($f);
    $fw=fopen("piccounter.txt", "w");
    fwrite($fw, $num);
    // echo $num;
    while (!feof($fw)) {
        # code...
        $array_count=1;
        $current_number=fgetc($fw);
        $counter_array[$array_count]=$current_number;
        $array_elements=count($counter_array);              //这里是18行
        $array_count=$array_count+1;
    }

    for($array_id=1;$array_id<$array_elements;$array_id++){
        echo "<img src=\"$counter_array[$array_id].jpg\" \ >";
    }
    fclose($fw);
?>
<body>

</body>
</html>
1 回复
#2
szchina2013-03-07 10:19
回复 楼主 szchina
该问题已经在其他论坛解决!————楼主回复
1