Home >Backend Development >PHP Tutorial >php怎么开启gd2扩展

php怎么开启gd2扩展

WBOY
WBOYOriginal
2016-06-13 11:57:392428browse

php如何开启gd2扩展
php如何开启gd2扩展

标准安装apache和php之后,如果需要gd库的支持,只需要执行如下命令就ok了:
apt-get install php5-gd


找到php的配置文件php.ini,搜索extension=php_gd2.dll,去掉前面的分号即可;
如果没有直接添加这种情况适合于windows系统和编译时支持gd的php,保存后重启apache即可
如果用的是安装版本如Ubuntu的deb。redhat的rpm安装的php可以使用命令安装即可
    Ubuntu:sudo apt-get install php5-gd
    redhat:yum install php-gd
FreeBSD可以使用systeminstall的package安装gd2解决
如果是编译安装并且没有选择支持gd需要先安装gd,然后重新编译php

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