Home > Backend Development > PHP Tutorial > Implementation method of opening GD library in php_PHP tutorial

Implementation method of opening GD library in php_PHP tutorial

WBOY
Release: 2016-07-13 17:08:30
Original
885 people have browsed it

The GD library is not enabled by default in php. If you want it to support image processing functions, we need to remove the previous; in extension=php_gd2.dll in php.ini. That’s it.

When the gd library of php is enabled on the windows server, gd does not appear in the Configure Command in the results obtained by phpinfo() after using cgi.

Find extension=php_gd2.dll in the php.ini file and remove the previous “;”.

Attached is also how to check whether the GD library code has been installed!

The code is as follows
 代码如下 复制代码

if(extension_loaded('gd')) {
echo '你可以使用gd
';
  foreach(gd_info() as $cate=>$value)
    echo "$cate: $value
";
}else
  echo '你没有安装gd扩展';
?>

Copy code



if(extension_loaded('gd')) {
echo 'You can use gd
';
foreach(gd_info() as $cate=>$value)
echo "$cate: $value
";
}else
echo 'You do not have gd extension installed';
?>


The result is shown as: You can use gd
GD Version: bundled (2.0.34 compatible)

FreeType Support: 1

FreeType Linkage: with freetype

T1Lib Support: 1

GIF Read Support: 1

GIF Create Support: 1

JPG Support: 1

PNG Support: 1

WBMP Support: 1

XPM Support:

XBM Support: 1

JIS-mapped Japanese Font Support:
If you have any questions,

What is displayed after Configure Command is:

Possible reasons: 1. Permission issues; 2. Is there a problem with the dual channel, or is the hardware loose?
http://www.bkjia.com/PHPjc/629834.html
www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629834.htmlTechArticleThe GD library is not enabled by default in php. If we want it to support image processing functions, we need to enable it in php. In the ini, just remove extension=php_gd2.dll in front of ";" and it will be fine. In windows service...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template