First, we go to php.net to download a version of PHP, remember if Windows Oh, but also need to be a thread version.
We first extract PHP to the c:/php directory, and then find the configuration file in PHP.ini (to the award php.ini-development to
Many beginners will isset and unset to confuse, in fact, they are the difference between the two is very big, can say that there is no relationship oh, I think may be like it, so think so oh, then let's take a look at the grammar of Isset.
Isset
PHP Microtime () Function Example Tutorial
Microtime () Definition and usageThe Microtime () function returns the current UNIX timestamp and microseconds.
Grammar
Microtime (Get_as_float)Parameter Description get_as_float Optional. When set to
How to use the PHP mail () function
PHP's Mail () function is used to send e-mail messages within the script.
Grammar
Mail (to,subject,message,headers,parameters)
Parameter descriptionRequired. Specify receiver/Receive emailmust be
When you set up a cookie, you pass the data through serialize to a string, and then pass the Base64_encode into a string without special symbols. Set this string into a cookie. Then use the GetCookie function to retrieve the corresponding data when
PHP expressions An expression is the most important component of PHP. In PHP 3.0, almost everything you write is an expression. The simplest but precise definition of an expression is "anything with a value". A simple example is constants and
Second, the preparation of beautiful code 1. Separate the background program from the front-end program When writing a PHP program, some of the code is used to handle transactions, such as manipulating the database, doing math, and so on, while some
1. Get installation files: http://www.php.net/downloads.php php-5.3.8.tar.gz
To obtain the support files needed to install PHP: http://download.111cn.net/download/netlong339/1351852 libxml2-2.6.32.tar.gz
2. Install LIBXML2
The code is
Before accessing a file, we usually need to determine whether the file exists to avoid errors caused by calling a non-existent file.Php checks whether a file has a function: file_exists (). The structure is as follows:File_exist ($ string );The $
Three process control structures of the program1. Ordered structure2. Select a structure3. Loop structure The result is as follows: The code is as follows:Copy code $ D = date ("D ");If ($ d = "Tue ")Echo "Today is Tuesday ";ElseEcho "today is
Format the time and/or date by region. The setting of the current language environment for the month and the day of the week and other language-related strings is as follows: setlocale ().Not all conversion specifiers support your C library. In this
Syntax: new Class creates an objectCreates a new instance of a class. An instance of a class is called an object.ExampleClass MyClass{ Var $ s = "Hello World ";Function getProperty (){Return $ this-> s; } }$ A = new MyClass;$ A-> s = "Have a nice
Array_unique("= 4.0.1, PHP 5" in PHP 4)Array_unique-delete an array of repeated valuesDescriptionArray array_unique (array $ array [Abstract $ sort_flags = SORT_REGULAR])Take an input array and return a new array with no repeated values.Note that
Is_writable(PHP 4 and PHP 5)Is_writable-tell whether filename is writtenDescriptionBoolean is_writable (string $ file name)Returns TRUE if the object exists and can be written. This file name parameter may be a directory name that allows you to
Recently, when an input box loses focus, the function automatically saves data. Of course, when the jQuery selector selects input and blur, ajax submits data to the PHP file and the PHP file saves the data. It is important to pay attention to
What if gzip compression is enabled?ApacheStep 2 The code is as follows:Copy code LoadModule deflate_module modules/mod_deflate.soLoadModule headers_module modules/mod_headers.so Add the following code in http. conf: The code is as
Method 1: The code is as follows:Copy code $ Url = http://www.111cn.net ";$ FileExists = @ file_get_contents ($ url, null, null,-1, 1 )? True: false;Echo $ fileExists; // If 1 is returned, the file exists.?> Method 2: The code is as
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