Windows
1. copy {php_path}\dlls\*.dll c:\windows\system32\ #将所有dll文件复制到system32目录下
2. 打开php.ini
3.[data:extension_dir]
extension_dir="{php_path}/extensions/";
4.[data:extsion]
";extension=php_gd2.dll"-->"extension=php_gd2.dll"
Linux
yum install php-gd* #yum安装(32bits OS)
yum install php-gd.x86_64#yum安装(64bits OS)
apt-get install php7.0-gd #apt-get安装
原文:https://www.cnblogs.com/H0ng2x/p/13679183.html