The official manual provides the following examples:
CopyCode The Code is as follows: // Example of using namespace
Namespace foobar;
Class Foo {
Static public function test (){
Print "Hello world! \ N ";
}
}
Call_user_func (_ namespace _. '\ FOO:
CopyCodeThe Code is as follows:
Please click
Copy codeThe Code is as follows: If ($ _ Get ["action"] = "OK "){Echo "I'm OK! ";}Else{Echo "I'm not OK! ";}?>
Template.htm:
CopyCode The Code is as follows:
% title %
% title %
% body %
PHP file: copy Code the code is as follows:
// replace function is used to replace the keywords in the content read from the template file with
String str_pad (string, int pad_length, string pad_string, int pad_type );
String indicates the string, pad_length indicates the length, pad_string indicates the string to be filled (optional parameter), and pad_type indicates the filling position (
The details are as follows:
1> if we know the start time, we need to add or subtract a time to get a result time, you can use the following
Code
$ Time1 = '2017-10-1 12:30:30 ';Echo date ('Y-m-d h: I: s', strtotime ($ time1) + 30*60); // pay
Post the implementation methods under IIS 7.
Environment:Operating System: Windows 2003 Server SP2PHP version: php-5.2.6-Win32
1. Download FastCGI for IIS6
Http://www.microsoft.com/downloads/details.aspx? Familyid = 2d481579-9a7c-4632-b6e6-dee9
When using a template, you may encounter the following problem: the operation is troublesome when the page information is displayed. N templates have paging blocks.
For example:
--- A total of 20 records. Go -----
When I first encountered this
The method is as follows:
$ Arr = array (............) ; // Assume that an array with 10 thousand elements contains repeated elements.
$ Arr = array_flip ($ ARR); // you can delete duplicate elements.
What is going on? Let's take a look at the
CopyCode The Code is as follows:
form
name: password: Password confirmation: Gender: male female birthday: Email: occupation: Copy code The Code is as follows: // Book Program Used to receive form data
/****** Generate the session ID ******/
The basic idea is to get the time of the current microsecond, then generate a random number, add the random number and the current time, encrypt it, and finally extract the required length.
/*
Function Name:
CopyCode The Code is as follows: @ Mysql_connect ("localhost", "root", "1981427") // You must connect to the database server before selecting a database.
Or die ("database server connection failed ");
@ Mysql_select_db ("test") // select the
Two simple templates:
CopyCode The Code is as follows:
{Title}
{Title}
{body}
Copy codeThe Code is as follows: {Title} {Title} {body}
You must first install the http_template_it class libraryCopy codeThe Code is as follows:
CopyCode The Code is as follows:
form
name: password: Password confirmation: Gender: male female birthday: Email: occupation: Copy code The Code is as follows: function form_sub (){If (! Test_username (
Of course, it is more flexible to solve in the program, for example:
"Select convert (char, Date Field, 120) as date2 from table"
Convert (char, date, N)N date style0 04 2 2005 AM1 04/02/052 05.04.023 02/04/054 02.04.05
5 02-04-056 02 04 057 04
Copy codeThe Code is as follows: /*
XML-RPC library from the Internet, very useful for developing small external communication interfaces
*/
Function & XML_serialize ($ data, $ level = 0, $ prior_key = NULL ){# Assumes a hash, keys are the variable
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