First, the preparatory work:
Os:windows7 SP1
nginx:nginx-1.3.5
php:php-5.4.6
Second, decompression php-5.4.6-win32-vc9-x86.zip to d:php, will be one of the php.ini-production to php.ini.
Third, extract Nginx-1.3.5.zip to D:nginx, edit
code is as follows
copy code
function Datetime_to_unix (datetime) {var tmp_datetime = datetime.replace (/:/g, '-');Tmp_datetime = tmp_datetime.replace (//g, '-');var arr = tmp_datetime.split ("-");var now = new Date (DATE.UTC
$ Oimg = "test.jpg"; // original image name$ Classes = array ('translation', 'autoheight', 'autowidth', 'stretch '); // give classes for the new creating images 'size which are defined in the specified ini file$ Suffix = 'jpg '; // the new image's
Images are zoomed in and out by comparison. This function is implemented using the gd library function in the php Tutorial. We will use imagecreatetruecolor () and imagecopyresampled () for operations.Function my_image_resize ($ src_file, $ dst_file,
I used getimagesize to get the size of the original image, and then x0.5 is to set the image/5.Array getimagesize (string $ filename [, array & $ imageinfo])The getimagesize () function will determine any gif, jpg, png, swf, swc, pstutorial d, tiff,
// Create an image$ Im = imagecreatetruecolor (100,100 );// Set the background to red$ Red = imagecolorallocate ($ im, 255, 0, 0 );Imagefill ($ im, 0, 0, $ red );// Output imageHeader ('content-type: image/png ');Imagepng ($ im );Imagedestroy ($ im )
. Jpgraph open source project introductionJpgraph is a function library for creating object-oriented graphs. It can be used to generate commonly used charts, such as bar charts, pie charts, Gantt charts, and mesh charts. Supported image formats
Learn about PHP. Getting strings in PHP has a strlen built-in function;Here we will share with you a more efficient way to judge the length of a string under certain circumstances;Let's take a look at the execution efficiency of the following two
SQL has many statements for database operations. However, common and comparative statements are required. SELECT statements are used to SELECT data from the database. First, we will introduce the first SELECT statement.Statement 1: SELECT * FROM
When using header ("location: test. PHP") in php to redirect, pay attention to the following points:1. There must be no space between location and:. Otherwise, an error will occur.2. There cannot be any output before using the header, including the "
Yesterday, I helped the customer modify the sidebar. I thought I could breathe a sigh of relief. As a result, he sent another message and said that he needed to add a tag under each article, the ads for their company's 12 businesses are displayed
Not afraid of mental retardation... Everything The code is as follows:Copy code Function getmicrotime (){ List ($ usec, $ sec) = explode ("", microtime ());Return (float) $ usec + (float) $ sec );} In fact, we have processed the microtime ()
1. basename ()-returned path file nameSee the following php code: The code is as follows:Copy code $ Path = "/usr/www/html/index. php ";Echo basename ($ path). " ";// If suffix is selected, the extension is ignored.Echo basename ($ path, ". php "
The code is as follows:Copy code // Set the header information and forcibly download the objectFunction download_send_headers ($ filename ){// Disable caching$ Now = gmdate ("D, d m y h: I: s ");Header ("Expires: Tue, 03 Jul 2001 06:00:00 GMT ")
After I came back, I was always worried. So I read the book and gave me the answer. In order to remember them, I decided to give a big summary of an array sorting function.The first issue is PHP array sorting and descending sorting.Sort: This
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