[php] view plain copy
- // Set the content-type
- header("Content-type: image/png");
- // Create the image
- $im = imagecreatetruecolor(400, 100);
- // Create some colors
- $white = imagecolorallocate($im, 255, 255, 255);
- $grey = imagecolorallocate($im, 128, 128, 128);
- $black = imagecolorallocate($im, 0, 0, 0);
- imagefilledrectangle($im, 0, 0, 399, 100, $white);
- // The text to draw
- $text = '字典网';
- // Replace path by your own font path
- $font = 'fontName.ttf';
- // Add some shadow to the text
- //imagettftext($im, 60, 0, 11, 21, $grey, $font, $text);
- // Add the text
- imagettftext($im, 60, 0, 0, 70, $black, $font, $text);
- // Using imagepng() results in clearer text compared with imagejpeg()
- imagepng($im);
- imagedestroy($im);
九州易通科技开发的核心产品易通企业网站系统(CmsEasy3.0)是充分按照SEO最佳标准来开发,营销实用性非常强企业建站系统。灵活的静态化控制,可以自定义字段,自定义模板,自定义表单,自定义URL,交叉绑定分类,地区,专题等多元化定制大大增加了企业网站的各种需求空间。强大的模板自定义可以轻松打造出个性的栏目封面,文章列表,图片列表,下载列表,分类列表,地区列表等等。主体功能列表如下:支持生成ht
如果想保存图可以用下面代码
[html] view plain copy
- ob_start();
- imagejpeg($im);
- $img = ob_get_contents();
- ob_end_clean();
- $size = strlen($img);
- $fp2=@fopen('tst.jpg', "a");
- fwrite($fp2,$img);
- fclose($fp2);










