Jump to content

Fatal Error: Maximum execution time


TeddyKiller

Recommended Posts

This script keeps giving a Fatal error.

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\uni\event.php on line 51

 

Whats the problem? >.<

 

        function GetDays($sStartDate, $sEndDate){
            $sStartDate = gmdate("Y-m-d", $sStartDate);
            $sEndDate = gmdate("Y-m-d", $sEndDate);

            $aDays[] = date("d", strtotime($sStartDate));
            $sCurrentDate = $sStartDate;

            while($sCurrentDate < $sEndDate){
                $sCurrentDate = gmdate("Y-m-d", strtotime("+1 day", strtotime($sCurrentDate)));
                $aDays[] = date("d", strtotime($sCurrentDate));
            }
            return $aDays;
        }

        $event_txt = "Dates for this holiday!<br />" . implode(", ", GetDays(strtotime($ev["event_start"]), strtotime($ev["event_end"]))) . "";
echo $event_txt;

Link to comment
https://forums.phpfreaks.com/topic/198509-fatal-error-maximum-execution-time/
Share on other sites

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.