首先,PHP是最好的语言!
下面我们来说下PHP图像处理函数中的gd_info()函数。
gd_info() --取得当前安装的 GD 库的信息。
下面我们来实际输出一下(以THINKPHP5.0版本为例):
/** * PHP 图像函数 */public function imgClass(){ //取得当前安装的 GD 库的信息 var_dump(gd_info());}
返回结果是数组,共有12个序列,下面将一一介绍。
array (size=12) 'GD Version' => string 'bundled (2.1.0 compatible)' (length=26) 'FreeType Support' => boolean true 'FreeType Linkage' => string 'with freetype' (length=13) 'GIF Read Support' => boolean true 'GIF Create Support' => boolean true 'JPEG Support' => boolean true 'PNG Support' => boolean true 'WBMP Support' => boolean true 'XPM Support' => boolean true 'XBM Support' => boolean true 'WebP Support' => boolean true 'JIS-mapped Japanese Font Support' => boolean false
领取专属 10元无门槛券
私享最新 技术干货