1

I got this message everytime i try to run a .COM script.

Fatal error: Maximum execution time of 30 seconds exceeded in D:\wamp\www\php\page.php on line 3

.NET is installed on my computer

PHP CODE:

$Browser = new COM('InternetExplorer.Application');
$Browserhandle = $Browser->HWND;
$Browser->Visible = true;
$Browser->Fullscreen = true;
$Browser->Navigate('http://www.stackoverflow.com');

while($Browser->Busy){
com_message_pump(4000);
}

$img = imagegrabwindow($Browserhandle, 0);
$Browser->Quit();
imagepng($img, 'screenshot.png');

Fatal error: Maximum execution time of 30 seconds exceeded in D:\wamp\www\php\page.php on line 3

.NET is installed on my computer.

4

1 回答 1

3

Do you expect that the com program will run for longer than 30 seconds? If so use set_time_limit to increase the maximum execution time of your script. ie set_time_limit(0); for unlimited duration.

于 2011-06-21T17:20:17.277 回答