PHP_GD_GIF.DLL那里有的下载,还有什么办法让我的PHP4.24支持GIF。

PHP_GD_GIF.DLL那里有的下载,还有什么办法让我的PHP4.24支持GIF。在线等待!
---------------------------------------------------------------

下载地址:http://216.87.7.32/php/php_gd_gif.zip (160K).

首先把文件解压,然后把php_gd_gif.dll 改名为 php_gd.dll,
拷贝到 extensions 目录,修改 PHP.ini ,增加 extension=php_gd.dll。
该库支持 GIF, PNG, WBMP 和 JPEG,但只对 PHP4 有效。

示范例子:
(本例已经在本人的PHP4+W2KPro+Apache1.3.12 上成功通过)
需要说明的是:
如果你的 dll 文件和php.exe 在同一个目录下那么
extension_dir = .
当然,修改完毕后,别忘记重新启动Web Server

 1   
 2  
 3/* Header( "Content-type: image/jpeg"); */   
 4Header( "Content-type: image/gif");   
 5  
 6/* create image */   
 7$image = imagecreate(200,200);   
 8  
 9/* create color R=100, G=0, R=0 */   
10$maroon = ImageColorAllocate($image,100,0,0);   
11  
12/* create color R=255, G=255, R=255 */   
13$white = ImageColorAllocate($image,255,255,255);   
14  
15/* create color green */   
16$green = ImageColorAllocate($image,0,100,0);   
17  
18/* create white background*/   
19ImageFilledRectangle($image,0,0,200,200,$white);   
20  
21/* create frame*/   
22ImageRectangle($image,10,10,190,190,$maroon);   
23  
24/* create inner rectangle*/   
25ImageFilledRectangle($image,50,70,150,150,$maroon);   
26  
27/* display 5 fonts */   
28for ($i=1; $i <= 5; $i++)   
29ImageString($image,$i,15,$i*10,'www.oso.com.cn',$green);   
30  
31/* render image */   
32/* ImageJPEG($image); */   
33ImageGIF($image);   
34  
35/*cleanup memory */   
36ImageDestroy($image);   
Published At
Categories with Web编程
comments powered by Disqus