getimagesize
不适用于 Windows 7,但可以在 XP 上运行。第一次执行时,它返回FALSE
,当再次执行时,它什么也不返回。
function ezImage($image,$pad = 5,$width = 0,$resize = 'full',$just = 'center',$border = ''){
...............
...............
...............
$imageInfo = @getimagesize($image);
if (!$imageInfo) {
//remove tempfile for remote images
if ($temp == true) unlink($image);
return false;
}
.............
.............
}
在 Windows 7 的情况下,第一次当它进入getimagesize
函数时它返回 0,第二次调用这个函数时它根本不返回。我检查了网址$image
,没问题。如果我直接在浏览器中输入 URL,它会立即显示图像。
第一次执行会引发以下警告消息:
Warning: getimagesize(http://localhost/metornet/metornet_chart_paxalarm.php?title=MetorNet+Statistics&names%5B%5D=03%2F07%2F12%0A08%3A48+-%0A03%2F07%2F12%0A08%3A49&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A49+-%0A03%2F07%2F12%0A08%3A50&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A50+-%0A03%2F07%2F12%0A08%3A51&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A51+-%0A03%2F07%2F12%0A08%3A52&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A52+-%0A03%2F07%2F12%0A08%3A53&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A53+-%0A03%2F07%2F12%0A08%3A54&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A54+-%0A03%2F07%2F12%0A08%3A55&pax%5B%5D=0&alarms%5B%5D=0&rates%5B%5D=0.0&names%5B%5D=03%2F07%2F12%0A08%3A55+-%0A03%2F07%2F12%0A08%3A56&pax%5B%5D=0&am in C:\Program Files\..\..\Includes\ros_pdf_class\class.ezpdf.php on line 1344
第二次执行抛出这个致命错误:
Fatal error: Maximum execution time of 120 seconds exceeded in C:\Program Files\.. \..\Includes\ros_pdf_class\class.ezpdf.php on line 1344