我试图制作一个像插件一样的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 pluginSelect One or More Plugin to connect your website for your reservation
Just A Button
Instructions
Copy this code and paste into your website
有人可以提出任何解决方案来克服这个问题?