About 0x00
This article mainly analyzes PHP's use of the GD Library's imagecreatefrompng () function to reconstruct a PNG image may result in a local file inclusion vulnerability.
When the system exists the point that the file contains, can
Copy CodeThe code is as follows:
/*PHP generates a text PNG image, which can be called using the following methods:Http://www.yourdomian.com/text_png.php3?msg=helloworld+class&rot=15&size=48&f/ARIAL. TTF*/Header ("Content-type:image/png");Class
Php image function example (not original ). The following is a method: if (! Function_exists (imagecreate) {die (this server does not support the GD module);} if not, how can I configure it? Download the dll file of the gd module and modify the
Note: This feature relies on the GD2 graphics libraryrecently to use PHP to generate thumbnails, find a bit online, found this article: PHP Generate thumbnail imageAfter a trial, we found that there were several problems:1. PNG images generated
The following is a method: If (! Function_exists ('imagecreate ')){Die ('the current server does not support GD module ');}If not, how can I configure it? Download the dll file of the gd module, modify php. ini, and restart the server.The PHP plot
The following approach is a method:
if (!function_exists (' imagecreate ')) {
Die (' This server does not support GD module ');
}
How do I configure it if not supported? Download the DLL file of GD module, modify the php.ini, restart the
The following approach is one way:
if (!function_exists (' imagecreate ')) {
Die (' This server does not support GD module ');
}
If not, how do I configure it? Download the GD module DLL file, modify the php.ini, restart the server.
the following
The example in this paper describes how PHP implements scaling of PNG images. Share to everyone for your reference. The implementation method is as follows:
function Smart_resize_image ($file, $width = 0, $height = 0, $proportional =
Have you ever thought about: To Compress js files, convert js files into PNG images, and then use the getImageData () function in the canvas control to re-read images into js files. I mentioned this method in my post on rapid loading of JS files
Deployment environmentSystem: CentOS6.8 x86_64apache:2.4.23mysql:5.7.14php:7.0.10apr:1.5.2apr-util:1.5.4boost:1.59.0cmake:3.6.1pcre:8.39Package PreparationHere CentOS6.8 system (no graphics environment) installation process slightly, using the PC
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.