這是我網頁截圖的程式碼
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->FullScreen = true;
$browser->Navigate("http://localhost/2.php");
/* Is it completely loaded? (be aware of frames!)*/
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "nimages/2.png");
imagedestroy($im);
?>
我用CMD執行後,他給我這段錯誤
PHP Fatal error:call to undefined method com::Quit()
inC:\Users\user\Desktop\9.php on line 14
請問各位大大,我該如何解決這個問題?