/**
* Get image address in CSS and save to local
*/
Class Getincssimage
{
/**
* Picture saved
* @param URL address of $cssUrl CSS
* @param $dir directory to save pictures
* @return void
*/
Class Mycache
{
Private $cache;
function __construct ()
{
$this->cache = new Memcache ();
You can replace the localhost by memcached server IP addr and port No.
$this->cache->connect (' localhost ', 10987);
}//
Basic steps in drawing technology prerequisites: Enable the GD library in the php.ini file
Create Canvas The default background is black
$img =imagecreatetruecolor (400,300);
Draw various shapes
Create a color
$background =
PHP character security filter functions, PHP to prevent SQL injection attacks and XSS attacks commonly used functions, including mysql_real_escape_string (), Addslashes (), Htmlentities (), Functions such as Htmlspecialchars (), Strip_tags ().
Var_dump (In_array (0, Array (' s '));
Copy CodeResult: BOOL (TRUE).Because In_array will compare 0 and ' s ', 0 is the number type, ' s ' is a string type, and according to the instructions in the chapter "Comparison Operators" in PHP
/*
More & Original PHP framwork
Copyright (c) 2007-2008 Ismole Inc.
Author:kimi
Documentation: Download the picture in the style file, water special Mr Skinner tool
*/
Note Set PHP timeout time
Set_time_limit (0);
For PHP to save binary raw data as a picture file method, receive post over the binary raw data, select a generated path and the name of the picture, then write, need to refer to the friend.
Example,PHP saves binary raw data for picture
Establishing a database connection
$link = mysql_connect ("localhost", "Mysql_user", "Mysql_password")
Or Die ("Could Not connect:". Mysql_error ());
Get the current number of pages
if (Isset ($_get[' page ')) {
$page =
about thinkphp usage in memcache, including memcache installation, how to run it in thinkphp, thinkphp In Memcache as an example of caching, a friend is required to refer to the below. !--ad-->!--ad--end--> thinkphp memcache Cache usage 1,
Header (' Content-type:text/html;charset=utf-8 ');
Image processing
1 set MIME type output type text/html default is page type can not write
Header (' content-type:image/png; ');
$width = 400;
$height = 400;
1.the skills an IT engineer should haveI think the practical skills include 3 aspects, 1:Figure 1All of these are important:Coding: You must be able to write high-quality code within a limited time.Experience: Experience shows that you are
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service