How does php detect if gd2 is installed
This article mainly introduces php how to check whether gd2 is installed, the article is very detailed, has a certain reference value, interested friends must read it!
Php detects whether gd2 is installed: 1. Execute "phpinfo ();" code, and install GD2 if there is a "gd" module in the output PHP details. 2. Open the ext folder under the php installation directory to see if there is a "php_gd2.dll" file, and if so, install the GD2 library.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
The method of checking whether gd2 is installed by php
Method 1. Start phpinfo () to confirm the GD2 library, and start the method:
Find the htdocs folder in the xampp directory, go to the folder and create a new file with the suffix .php, and use the editor to enter the following code in .php:
In the browser address bar, type http://loaclhost: port (optional) / xxx (above file name) .php, then enter, the page will display the details of PHP, drop down the page, you should see the information of gd, as shown in the following figure.
Method 2. See if php comes with the gd2 library.
Open the ext folder under the php installation directory to see if there is a php_gd2.dll file. If so, it means that the GD2 library has been installed.
The above is all the contents of the article "how to detect whether gd2 is installed by php". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!