⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 displaying_text.php

📁 《PHP专业项目实例开发》源代码
💻 PHP
字号:
 <html>
 <head>
 </head>
<body>
                              
  <?php
  $img=ImageCreate(300,300);
  $bgcolor=ImageColorAllocate($img,200,200,200);
  $red=ImagecolorAllocate($img,255,0,0); 
  $green=ImagecolorAllocate($img,0,255,0); 
  $blue=ImagecolorAllocate($img,0,0,255); 
  $grey=ImagecolorAllocate($img,50,50,50); 
  $black=ImagecolorAllocate($img,0,0,0); 
  ImageString($img,0,20,20,"Line 1",$red);
  ImageString($img,1,20,40,"Line 2",$green);
  ImageString($img,2,20,60,"Line 3",$blue);
  ImageString($img,3,20,80,"Line 4",$grey);
  ImageString($img,4,20,100,"Line 5",$black);
  ImageString($img,5,20,120,"Line 6",$red);
  ImageStringUp($img,0, 50,200,"Line 1",$red);
  ImageStringUp($img,1,100,200,"Line 2",$green);
  ImageStringUp($img,2,150,200,"Line 3",$blue);
  ImageStringUp($img,3,200,200,"Line 4",$grey);
  ImageStringUp($img,4,250,200,"Line 5",$black);
  ImageStringUp($img,5,300,200,"Line 6",$red);
                                                            
  ImageSetPixel($img,50,50,$pixelcolor);
  ImagePNG($img,"pic.png");
  ImageDestroy($img);
?>
<img src="pic.png" border=0>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -