| unix菜鸟 回复于:2003-01-19 11:04:33 | ||||||||||||||||||||||
| 收藏,谢谢! | ||||||||||||||||||||||
| sandaitanke 回复于:2003-02-09 14:51:55 | ||||||||||||||||||||||
| >>注意:如果您使用了中文语言文件,但是您的linux不支持中文,则在产生的图片中文字可能为乱码。
我看了webalizer 2.01-10 的源码,不能输出中文好像是使用gd的函数的问题,比如 注意:如果您使用了中文语言文件,但是您的linux不支持中文,则在产生的图片中文字可能为乱码。pie_chart中 gdImagestring()吧。中文用这个函数可能不行。 我在redhat 7.2 上是不行的。 没有条件试验,没有支持中文的linux. 8-( | ||||||||||||||||||||||
| HonestQiao 回复于:2003-02-10 04:41:54 | ||||||||||||||||||||||
| 我们使用的FreeBSD系统,该如何输出中文呢?
我在php之中可以制定一个ttf字体文件来输出中文图像的. 那么在这里怎么操作呢??? | ||||||||||||||||||||||
| sandaitanke 回复于:2003-02-10 10:06:13 | ||||||||||||||||||||||
| 我没有试验过,以下文字是我看webalizer2.01-10 GD 1.8.4 php 4.1.2
SourceCode 得出的结论,如果不正确,请指正。 首先要编译你的gd 支持TTF gdtestttf 可以测试。 然后应该是把webalizer中 pie_chart 等输出图形的函数 中的 gdImageString 用 gdImageStringTTF 替换。 用这个函数:gdImageStringTTF() php的source中 imagettftext 的实现中有gdImageStringTTF用法。 \ext\gd\gd.c 中 | ||||||||||||||||||||||
| 阿骁 回复于:2003-02-13 22:26:21 | ||||||||||||||||||||||
| 我装好了,大家可以看看 webalizer 的效果,不错的!
http://music.xmgd.com/webalizer/index.html | ||||||||||||||||||||||
| lazylee 回复于:2003-02-14 08:54:49 | ||||||||||||||||||||||
| 俺想知道您这个 music.xmgd.com 的首页在哪里,歌看起来不错的样子 | ||||||||||||||||||||||
| 阿骁 回复于:2003-02-14 09:26:37 | ||||||||||||||||||||||
| [quote:8b2cd220e3="lazylee"]俺想知道您这个 music.xmgd.com 的首页在哪里,歌看起来不错的样子[/quote:8b2cd220e3]
http://www.xmgd.com/music/index.jsp | ||||||||||||||||||||||
| 南非蜘蛛 回复于:2003-02-14 10:54:18 | ||||||||||||||||||||||
| 有没有黑人说唱的呀 | ||||||||||||||||||||||
| 阿骁 回复于:2003-02-14 11:09:02 | ||||||||||||||||||||||
| 呵呵 。。。 暂时只有中文的歌曲。 | ||||||||||||||||||||||
| ihweb 回复于:2003-02-14 11:16:48 | ||||||||||||||||||||||
| [quote:0e37c4ba0b="阿骁"]我装好了,大家可以看看 webalizer 的效果,不错的!
http://music.xmgd.com/webalizer/index.html[/quote:0e37c4ba0b] 没做DNS查询...... 还有,里面都放了些什么歌啊? 我的一个装慢MP3的HD坏了,心疼啊!!里面有很多我喜欢的歌曲啊。 | ||||||||||||||||||||||
| 阿骁 回复于:2003-02-14 11:35:36 | ||||||||||||||||||||||
| [quote:d6eac44c57="ihweb"]
没做DNS查询...... 还有,里面都放了些什么歌啊? 我的一个装慢MP3的HD坏了,心疼啊!!里面有很多我喜欢的歌曲啊。[/quote:d6eac44c57] 做 DNS 查询? 是指反向查询吗? 做了反向查询速度应该会变慢吧? | ||||||||||||||||||||||
| lazylee 回复于:2003-02-14 11:37:55 | ||||||||||||||||||||||
| 而且DNS反向查询一般出不来什么有意义的东西 | ||||||||||||||||||||||
| tyyx 回复于:2003-02-16 16:17:27 | ||||||||||||||||||||||
| [quote:e48acfcd80="sandaitanke"]我没有试验过,以下文字是我看webalizer2.01-10 GD 1.8.4 php 4.1.2
SourceCode 得出的结论,如果不正确,请指正。 首先要编译你的gd 支持TTF gdtestttf 可以测试。 然后应该是把webalizer中 pie_chart 等输出..........[/quote:e48acfcd80] 我将graphs.c的最后几行修改了一下: /*****************************************************************/ /* */ /* INIT_GRAPH - initalize graph and draw borders */ /* */ /*****************************************************************/ void init_graph(char *title, int xsize, int ysize) { int i; im = gdImageCreate(xsize,ysize); /* allocate color maps, background color first (grey) */ grey = gdImageColorAllocate(im, 192, 192, 192); dkgrey = gdImageColorAllocate(im, 128, 128, 128); black = gdImageColorAllocate(im, 0, 0, 0); white = gdImageColorAllocate(im, 255, 255, 255); green = gdImageColorAllocate(im, 0, 128, 92); orange = gdImageColorAllocate(im, 255, 128, 0); blue = gdImageColorAllocate(im, 0, 0, 255); red = gdImageColorAllocate(im, 255, 0, 0); cyan = gdImageColorAllocate(im, 0, 192, 255); yellow = gdImageColorAllocate(im, 255, 255, 0); char *myfont = " /usr/X11R6/lib/X11/fonts/Type1/simsun.ttf"; /* make borders */ for (i=0; i<5 ;i++) /* do shadow effect */ { gdImageLine(im, i, i, xsize-i, i, white); gdImageLine(im, i, i, i, ysize-i, white); gdImageLine(im, i, ysize-i-1, xsize-i-1, ysize-i-1, dkgrey); gdImageLine(im, xsize-i-1, i, xsize-i-1, ysize-i-1, dkgrey); } gdImageRectangle(im, 20, 25, xsize-21, ysize-21, black); gdImageRectangle(im, 19, 24, xsize-22, ysize-22, white); gdImageRectangle(im, 0, 0, xsize-1, ysize-1, black); /* display the graph title */ gdImageStringFT(im,0,blue,myfont,12,0.0,20,20,"锘縲ww.sdcczz.net璁块棶璁板綍"); /* gdImageString(im, gdFontMediumBold, 20, 8, "title", blue); */ 可以输出中文的图片. readhat 8.0 gd2.0.11 就看那位大写一段程序,将*title这个字符串变成UTF-8的编码....... | ||||||||||||||||||||||
| tyyx 回复于:2003-02-16 16:39:36 | ||||||||||||||||||||||
将语言文件改成UTF-8编码的,能显示文字,网页就一塌胡涂了。
| ||||||||||||||||||||||