E动网虚拟主机速度慢的问题已解决 :)

if(substr($str_url,0,1)==”/”)$str_url=urldecode(substr($str_url,1));
if(strtolower(substr($str_url,0,7)) != “http://”)
$str_url = $include.$str_url;
$img_size = @getimagesize( $str_url );

能看到错误的地方吧?$img_size = @getimagesize( $str_url );不分青红皂白就去读取图片信息,下面我们修改代码为:

if(substr($str_url,0,1)==”/”)$str_url=$site['link'].urldecode(substr($str_url,1));
if(strtolower(substr($str_url,0,strlen($site['link']))) == strtolower($site['link'])){
$str_url = $include.substr($str_url,strlen($site['link'])+1-strlen($str_url));
$img_size = @getimagesize( $str_url );
}

判断此图片是否本站文件,如果是就把 URL 转换成实际路径,并取得图片信息。

害,真羞人呀,原来一直是自己的问题 _-!! 经一事长一知,今后记住咯 -P