Home > Backend Development > PHP Tutorial > Use PHP code to generate images on web pages, _PHP tutorial

Use PHP code to generate images on web pages, _PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 09:47:57
Original
1085 people have browsed it

Use PHP code to generate images on the web page,

The code is very simple, not much nonsense here,

<&#63;php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/6/29
 * Time: 21:25
 */
header('Content-type:image/png');//设置mime type
$img = imagecreate(400,300);//设置图片像素
imagecolorallocate($img,255,255,255);//给图片上色
imageellipse($img,200,200,50,50,imagecolorallocate($img,255,0,0));//在图片上绘制图形,中心点200,200;宽高50,50
imagepng($img);//设置图片格式为PNG
Copy after login

The effect is as follows:

The above is the entire content of this article, I hope you all like it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1024923.htmlTechArticleUse PHP code to generate images on the web page. The code is very simple, not much nonsense here, php/** * Created by PhpStorm. * User: Administrator * Date: 2015/6/29 * Time: 21:25*/header('...
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template