Interface style I was referring to a foreign album website, change is not big, just convert the birds into Chinese, and upload the style also made changes, the reason for this choice is that I am easy to do extension, it supports 3 ways to add
Server-side include (small industry) used to create features, headers, footers, or content that will be reused for multiple pages.Server-side IncludeYou can insert the contents of the file into the PHP file before the server executes it, with the
You know how to build a file. You know how to open a file in a variety of different ways. You don't even know how to read and write data from a file!Now is the time to learn how to destroy (delete) files. Files deleted in PHP are interrupted by
To do more than the language search index, but the PHP program to the Linux system in the PHP command to execute the file, so that the PHP program file variables can not be obtained.
So to carry the parameters, but the command line to execute PHP,
DestructorThe role of php destructor is just opposite to that of constructor. Constructor is automatically executed when the object is instantiated, and the constructor is automatically executed when the object is destroyed.By default, php only
The strtotime () function parses the datetime description of any English text into a Unix timestamp.Example The code is as follows:Copy code Echo (strtotime ("now "));Echo (strtotime ("3 October 2005 "));Echo (strtotime ("+ 5 hours "));Echo
Login.htm The code is as follows:Copy code Untitled Document Login. php The code is as follows:Copy code Function showPage () // determine whether to log on without logon. Directly jump to the logon page.{If (! Isset ($ _ SESSION ["user"
Create a data table The code is as follows:Copy code Create table 'message '('Id' tinyint (1) not null auto_increment,'User' varchar (25) not null,'Title' varchar (50) not null,'Content' tinytext not null,'Lastdate' date not null,Primary key
The strtotime () function parses the date and time descriptions of any English text into Unix timestamps.Simple: The code is as follows:Copy code Echo strtotime ('-1 MON', strtotime ("2010-01-01"); // returns the Monday of the date.Echo
1. global takes effect on the entire page.Example 1 The code is as follows:Copy code Global $ var1, $ var2; Is the reference of an external variable with the same name, and the scope of the variable is still in the function. When you change the
The division operator always returns a floating point number. Only in the following cases: both operands are integers (or integers converted into strings) and can be fully divided. In this case, an integer is returned.The operands of the modulo
Example 1. unset () example The code is as follows:Copy code // Destroy a single variableUnset ($ foo );// Destroy a single array elementUnset ($ bar ['quux ']);// Destroy more than one variableUnset ($ foo1, $ foo2, $ foo3 );?> The action of
Break is used in various loops and switch statements mentioned above. Its role is to jump out of the current syntax structure and execute the following statements. The break statement can contain a parameter n, indicating the number of layers that
$ A & $ B and (bitwise and)$ A | $ B or (by bit or)$ A ^ $ B Xor (bitwise Xor)~ $ A Not (Not by bit)$ A $ A >>$ B Shift right (right Shift)Details$ A & $ B: Set the bitwise of 1 in both $ a and $ B to 1;Example: 10 & 12 = 810 101012 11001000 8$ A | $
For example, there is a string: $ a = 'Hello world hello pig hello cat hello dog hello small boys ';Then we want to change the 3rd hello appearance to good-bye, for example:'Hello world hello pig good-bye cat hello dog hello small boys ';In this
In natural language, we understand the abstract concept that a large description of an object is a common feature for a certain type of object. The same is true in PHP. We abstract a class to specify the general behavior of the class. This class
This function uses the TZ environment variable (if any) to calculate the timestamp. PHP 5.1.0 has an easier way to determine the time zone of All/dateTime functions used. This process is explained on the page of the date_default_timezone_get ()
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