1、把以下代码复制到记事本中并保存成A.php
<?php
Ob_end_flush();
header ("Content-type: image/png");
$im = @imagecreate (200, 100)
or die ("无法创建图像");
$background_color = imagecolorallocate ($im, 0,0, 0);
$text_color = imagecolorallocate ($im, 230, 140, 150);
imagestring ($im, 3, 30, 50, "www.pc811.com", $text_color);
imagepng ($im);
?>

 

2、把A.php上传到服务器空间下之后,并输入网站下的此文件目录并成功访问。

 

3、图片是个红叉就说明未开启GD库。如果没开启GD库,打开php.ini文件,并把php.ini文件中的extension=php_gd2.dll前面的;去掉并保存。

 

4、重启电脑之后,开始生效。

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-04-27
  • 2021-12-09
  • 2021-12-19
  • 2021-09-07
  • 2022-12-23
  • 2022-01-12
猜你喜欢
  • 2021-11-01
  • 2021-05-26
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案