imageRotate()函数不能用!!

duanjianbo26 2007-09-26 02:27:11

----------------------------------------------
用print_r(get_extension_funcs("gd"));得出的结果:
Array ( [0] => gd_info [1] => imagearc [2] => imageellipse [3] => imagechar [4] => imagecharup [5] => imagecolorat [6] => imagecolorallocate [7] => imagepalettecopy [8] => imagecreatefromstring [9] => imagecolorclosest [10] => imagecolorclosesthwb [11] => imagecolordeallocate [12] => imagecolorresolve [13] => imagecolorexact [14] => imagecolorset [15] => imagecolortransparent [16] => imagecolorstotal [17] => imagecolorsforindex [18] => imagecopy [19] => imagecopymerge [20] => imagecopymergegray [21] => imagecopyresized [22] => imagecreate [23] => imagecreatetruecolor [24] => imageistruecolor [25] => imagetruecolortopalette [26] => imagesetthickness [27] => imagefilledarc [28] => imagefilledellipse [29] => imagealphablending [30] => imagesavealpha [31] => imagecolorallocatealpha [32] => imagecolorresolvealpha [33] => imagecolorclosestalpha [34] => imagecolorexactalpha [35] => imagecopyresampled [36] => imagesettile [37] => imagesetbrush [38] => imagesetstyle [39] => imagecreatefrompng [40] => imagecreatefromgif [41] => imagecreatefromjpeg [42] => imagecreatefromwbmp [43] => imagecreatefromgd [44] => imagecreatefromgd2 [45] => imagecreatefromgd2part [46] => imagepng [47] => imagegif [48] => imagejpeg [49] => imagewbmp [50] => imagegd [51] => imagegd2 [52] => imagedestroy [53] => imagegammacorrect [54] => imagefill [55] => imagefilledpolygon [56] => imagefilledrectangle [57] => imagefilltoborder [58] => imagefontwidth [59] => imagefontheight [60] => imageinterlace [61] => imageline [62] => imageloadfont [63] => imagepolygon [64] => imagerectangle [65] => imagesetpixel [66] => imagestring [67] => imagestringup [68] => imagesx [69] => imagesy [70] => imagedashedline [71] => imagettfbbox [72] => imagettftext [73] => imageftbbox [74] => imagefttext [75] => imagetypes [76] => jpeg2wbmp [77] => png2wbmp [78] => image2wbmp )


----------------------------------------
phpinfo里面的信息
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.5
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
------------------------------------
不知道为什么出错,出错信息如下:
Fatal error: Call to undefined function imagerotate() in /export/wwwsourcingmap/logo/logoimage.class.php on line 244

PHP手册中这句
"注: 本函数仅在 PHP 与其捆绑的 GD 库一起编译时可用。"是什么意思啊?怎么解决?
...全文
617 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
ruanchao 2007-09-28
  • 打赏
  • 举报
回复
贴主对知识的态度,让人佩服!
duanjianbo26 2007-09-28
  • 打赏
  • 举报
回复
呵呵,问题解决了......
办法如下:
要激活 GD 支持,配置 PHP 时加上 --with-gd[=DIR],DIR 是 GD 的基本安装目录。要使用推荐的绑定的 GD 库版本(首次绑定于 PHP 4.3.0),使用 --with-gd。要编译 GD 库,需要libpng 和 libjpeg。


编译php时记得将 -with-gd[=DIR]改为--with-gd就OK了,还有千万要重新解压下php的安装包,以免make出错噢....
XQ2008 2007-09-27
  • 打赏
  • 举报
回复
duanjianbo26 2007-09-27
  • 打赏
  • 举报
回复
在csdn上面,以前也有人问过相关的问题,不过没解决办法....
http://topic.csdn.net/t/20061121/14/5174001.html
dreambird1983 2007-09-27
  • 打赏
  • 举报
回复
........

不知道原因在哪了,看看代码有没有什么错误吧。

等待高手,帮顶一下.
cloudgamer 2007-09-27
  • 打赏
  • 举报
回复
学习
duanjianbo26 2007-09-27
  • 打赏
  • 举报
回复
我PHP的版本是:PHP Version 5.1.4
duanjianbo26 2007-09-27
  • 打赏
  • 举报
回复
谢谢上面两位!
不好意思!可能我表达的不够清楚...
GD库我已经安装好了,并且可以用,但只是imageRotate()这个函数报错,其他的函数都没问题
这句"注: 本函数仅在 PHP 与其捆绑的 GD 库一起编译时可用。"是PHP手册里面解释这个函数是看到的,不太理解这句话的意思,我觉得跟这句话有关....
dreambird1983 2007-09-27
  • 打赏
  • 举报
回复
----------------------------------------
phpinfo里面的信息
GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.5
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
------------------------------------

楼上的,从phpinfo上来看,gd库已经装上了,还能怎么打开呢~~~

不过从错误报告上来看,确实是没找到函数。你Php版本多少的,这个函数只在php5.1以后的版本有效,手册上有写哦
hejunbin 2007-09-27
  • 打赏
  • 举报
回复
注: 本函数仅在 PHP 与其捆绑的 GD 库一起编译时可用。

GD库没有打开吧。。。

ruanchao 2007-09-26
  • 打赏
  • 举报
回复
在经过若干次试错之后,终于找到了史上最简单的安装GD的方法:
首先安装必要的库,以下是安完的结果

引用:
[root@localhost ~]# rpm -qa |grep freetype
freetype-2.1.9-1
[root@localhost ~]# rpm -qa |grep png
libpng-devel-1.2.7-1
libpng-1.2.7-1
libpng10-1.0.16-1
libpng10-devel-1.0.16-1
[root@localhost ~]# rpm -qa |grep jpeg
libjpeg-6b-33
libjpeg-devel-6b-33
[root@localhost ~]# rpm -qa |grep zlib
zlib-1.2.1.2-1
zlib-devel-1.2.1.2-1
[root@localhost ~]# rpm -qa |grep gd
gdbm-1.8.0-24
sysklogd-1.4.1-26_EL
gd-2.0.33-2
php-gd-4.3.9-3.1


照着我的命令行的结果对比吧,缺什么就补什么,其中
libpng10-1.0.16-1
libpng10-devel-1.0.16-1
不是必须的。
这些库的rpm包不需要到网上找的 直接在linux as 的安装盘里就可以找到,呵呵。安装盘真是宝库呀。

记住一点 php-gd-4.3.9-3.1 要最后一个安装。

安装完了之后 输入命令 service httpd restart

看一下phpinfo
支持GD,一切搞定
=============================================
==============================================
希望你有耐心看哈
duanjianbo26 2007-09-26
  • 打赏
  • 举报
回复
没人回?自己顶下!!!

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧