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
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 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 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
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&font=fonts/ARIAL. TTF
*/
Header
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.