Home  >  Article  >  Backend Development  >  How to open GD library in php?

How to open GD library in php?

黄舟
黄舟Original
2017-08-03 14:12:0622734browse

What is the GD library used for? It is an extension library for PHP to process graphics. The GD library provides a series of APIs for processing pictures. You can use the GD library to process pictures or generate pictures. The GD library is not enabled by default in PHP. If you want it to support image processing functions, you must manually enable the GD library.

Find the php.ini file. There are two methods:

1. Method 1: Find the path wamp\bin\mysql\mysql5.5.24\php.ini in the wampserver installation directory (the root directory of my installation is the D drive)

How to open GD library in php?

2. Method 2: Start wampserver, click the wamp icon on the taskbar, select PHP, and see php.ini, Click to enter the php.ini file

How to open GD library in php?

3. Open the php.ini file


4. Use the search tool to find extension=php_gd2.dll, and replace the [;] in front of extension=php_gd2.dll, just like it

How to open GD library in php?

5. Test whether the GD library can be used, the code is as follows:

How to open GD library in php?

6. You can use the GD library to run the renderings

How to open GD library in php?


##

The above is the detailed content of How to open GD library in php?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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