Home >Backend Development >PHP Tutorial >帮助文档里的事例输出乱码 请求教,该怎么处理

帮助文档里的事例输出乱码 请求教,该怎么处理

WBOY
WBOYOriginal
2016-06-13 10:11:151190browse

帮助文档里的事例输出乱码 请求教
这是从帮助文档上考下来的事例 但为什么输出是乱码呢 怎么解决

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php header("Content-type: image/jpeg");  $im = imagecreate(400,30);  $white = imagecolorallocate($im, 255,255,255);  $black = imagecolorallocate($im, 0,0,0);  // Replace path by your own font path  imagettftext($im, 20, 0, 10, 20, $black, "/path/arial.ttf",  "Testing... Omega: &#937;");  imagejpeg($im);  imagedestroy($im);?>


输出结果:

Warning: imagettftext() [function.imagettftext]: Invalid font filename in F:\wamp\www\bkqs\imageCode\file.php on line 9
??JFIF?>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ?C $.' ",#(7),01444'9=82<.342>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn