php imagecreate garbled solution: 1. Create a canvas through imagecreate; 2. Use imagecolorallocate to set the background color of the canvas; 3. Set "header('content-type:image/gif');" .
The operating environment of this article: Windows7 system, PHP7.1 version, DELL G3 computer
How to solve the garbled problem of php imagecreate?
Solution to the problem that PHP becomes garbled when creating an image (GD)
Problematic code:
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">php学习
Running result:
Modified code:
Running results:
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to solve the garbled problem of php imagecreate. For more information, please follow other related articles on the PHP Chinese website!