如何检测 *.ico 文件是否是 PHP 中的有效图标

chu*_*byk 0 php icons ico

我想测试 *.ico 图像是否是 PHP 中的有效图标。我尝试使用 getimagesize 函数,但它不支持 ICO 文件。

not*_*row 5

http://en.wikipedia.org/wiki/ICO_(file_format)

图标必须以 '0x00 0x00 0x01 0x00' 字节开头,这对于简单的测试来说就足够了。