免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 13665 | 回复: 19
打印 上一主题 下一主题

[GD] 不能使用imagettftext() 函数 [复制链接]

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-09-12 16:02 |只看该作者 |倒序浏览
我已经安装了gd库,可是“Fatal error</b>;:  Call to undefined function:  imagettftext() in <b>;/usr/x/bjmarry/htdocs/1.php</b>; on line <b>;56</b>;<br />;
”,高手指教,谢谢!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2005-09-12 16:57 |只看该作者

[GD] 不能使用imagettftext() 函数

你的phpinfo();这个里面包含了gd么?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2005-09-12 16:58 |只看该作者

[GD] 不能使用imagettftext() 函数

或者:


  1. <?php
  2. function myrow($id, $data)
  3. {
  4.     return "<tr>;<th>;$id</th>;<td>;$data</td>;</tr>;\n";
  5. }

  6. $arr = get_defined_functions();

  7. print_r($arr);
  8. ?>;  
复制代码


看看存在你需要的函数么?

论坛徽章:
0
4 [报告]
发表于 2005-09-12 17:49 |只看该作者

[GD] 不能使用imagettftext() 函数

要用ttf函数, 编译时不光 --with-gd 就行的
还有  
--enable-gd-native-ttf
--with-ttf[=DIR]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
5 [报告]
发表于 2005-09-12 17:52 |只看该作者

[GD] 不能使用imagettftext() 函数

http://w.yi.org/ftp/FAPM/PHP/php_manual_zh/ref.image.html

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
6 [报告]
发表于 2005-09-13 18:39 |只看该作者

[GD] 不能使用imagettftext() 函数

谢谢大家的帮忙,可是问题还是没有解决,今天从新编译了一下可还是不行,请看看那里有问题
(其他的插件已经安装完毕)
1.安装freetype
./configure --prefix=/usr/local/modules/freetype
2.安装gd
./configure --prefix=/usr/local/modules/gd --with-jpeg  --with-png --with-zlib --with-freetype=/usr/local/modules/freetype
make
make install
3.编译php
./configure --with-apache2 --with-mysql --enable-track-vars --with-apxs2=/usr/local/apache2/bin/apxs --with-iconv --with-dom --with-zlib-dir --enable-ftp --with-gd==/usr/local/modules/gd  --with-png-dir --with-jpeg-dir --with-zlib --enable-mbstring --enable-gd-native-ttf --with-ttf=/usr/local/modules/freetype/
4.从启apache

但问题依旧,不知何故?!

论坛徽章:
0
7 [报告]
发表于 2005-09-13 20:13 |只看该作者

[GD] 不能使用imagettftext() 函数

看phpinfo里面有没有gd,gd里面有没有ttf

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
8 [报告]
发表于 2005-09-14 09:10 |只看该作者

[GD] 不能使用imagettftext() 函数

有gd但gd里面没有ttf。y?我编译的时候已将他加进去了阿?!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
9 [报告]
发表于 2005-09-14 09:36 |只看该作者

[GD] 不能使用imagettftext() 函数

用TTF2看看,还有,你最好把目前的Apache停止了,然后编译,编译的时候,记得指定php的prefix

http://w.yi.org/ftp/FAPM/PHP/php_manual_zh/ref.image.html
表格 4. 所支持的字库

字库 配置开关
FreeType 1.x 要激活 FreeType 1.x 的支持,加上 --with-ttf[=DIR]。   
FreeType 2 要激活 FreeType 2 的支持,加上 --with-freetype-dir=DIR。   
T1lib 要激活 T1lib(Type 1 字体),加上 --with-t1lib[=DIR]。   
本地 TrueType 字符串函数 要激活本地 TrueType 字符串函数的支持,加上 --enable-gd-native-ttf。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
10 [报告]
发表于 2005-09-14 09:50 |只看该作者

[GD] 不能使用imagettftext() 函数

斑竹你的“用TTF2看看”,是什么意思,应该怎么做?谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP