为什么我用php中的imagestring_没有字显示出来呢,页面内容在我的php GD绘图后没有显示...

我试图制作一个像插件一样的PHP GD横幅,以使用户复制并粘贴图像链接并放入他们的网站,这对我来说工作得很好,问题是当我加载图像时,其他页面内容(如文本)等不显示到浏览器中

这里是我的PHP代码来绘制图像

header("Content-type: image/png");

$string = $_GET['text']. ' Click Here';

$im = imagecreatefrompng("../../images/banner.png");

$orange = imagecolorallocate($im, 0, 0, 0);

$px = (imagesx($im) - 1.5 * strlen($string)) / 2;

$font = 'verdana.ttf';

imagestring($im,50, $px, 45, $string, $orange);

imagepng($im);

imagedestroy($im);

?>提示:我把这段代码放在页面的顶部,以使头部工作

现在其他的html代码是:

add plugin

Select One or More Plugin to connect your website for your reservation

Just A Button

Instructions

Copy this code and paste into your website

有人可以提出任何解决方案来克服这个问题?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值