For example
$ Array3 = array ("gender" => "male", "name" => "not a woman ");$ Array4 = array ("gender" => "unknown", "Looks" => "handsome ");
After the merge, the latter will overwrite the former, so that after the merge, it will become
Array ([
CopyCode The Code is as follows: Date_default_timezone_set ('prc'); // Default Time Zone
Echo "Today:", date ("Y-m-d", time (), " ";
Echo "Today:", date ("Y-m-d", strtotime ("18 June 2008"), " ";
Echo "yesterday:", date ("Y-m-d", strtotime ("-1 day")
In most cases, we specify another URL address to process the form content to the action attribute, but in some cases, we need to submit the form data to ourselves. In this case, how should we specify the action attribute value?
If (isset ($ _ post ['
HTML section:
Function postrequest (strurl ){
VaR XMLHTTP;
If (window. XMLHttpRequest) {// for Mozilla, Safari ,...
VaR XMLHTTP = new XMLHttpRequest ();
}
Else if (window. activexobject) {// for Internet Explorer
VaR XMLHTTP = new activexobject
Therefore, I think all session-related tables should be specially treated in the master-slave database design. That is, all session data tables can be updated and queried. When a user accesses the site, the user is bound to the specified database.
Disadvantages: Images with different lengths and widths will be stretched and deformed, so they cannot be intelligently cropped. If you need to intelligently crop images, study them on your own.
$ Config = array ();
$ Config ['path'] = "./";
$
Package Functions ~ Easy and convenient! Although the compression ratio is a little worse than WinRAR, it does not matter. After all, it is only packaged for download.
It saves you the trouble to package your site on the server. If the server is not
$ _ Server ['php _ Self '] # File Name of the script being executed, which is related to document root.$ _ Server ['argv'] # parameters passed to the script.$ _ Server ['argc '] # include and pass Program Number of command line parameters (if
When a visitor leaves a message or post a message, we do not want the visitor to use HTML tags in the message or post. Therefore, when the visitor submits a message or post, I have to delete the HTML Tag, the following function is used to implement
Of course, you must first enable the reload_assist_ims on Function in CDN. in this way, no-cache is not used. this will convert no-cache to if-modified-since. so we write
ProgramIt is better to control if-modified-since. note: In the cache system
PHP batch obtains the maximum checkbox Value
1. Name
2. Use
When the plan is considered as part of an SQL command: if the field involved in the control is numeric
If (! Empty ($ _ post ['checkbox']) {$ Expr = join (",", $ _ post ['checkbox'
PHP pre-defined constants:
_ File __
The script file name being processed. If it is used in an included file, its value is the included file, not the file name.
_ Line __
The current number of objects being processed.
Php_version
Indicates
CopyCode The Code is as follows: Class lightpage_template {
VaR $ tpl_header;VaR $ tpl_footer;VaR $ tpl_parsing;VaR $ tpl_template;VaR $ tpl_dirname;
VaR $ tpl_parse_string;VaR $ tpl_parse_array;
VaR $ tpl_result;
Function _ construct (){$
The complete
Program You can modify the specific application.
The example I provided here is very simple. In fact, many applications can be shown in this example. For example, hiding a real URL ...... Hey, let's analyze it by yourself.
Create a
1. array_shift () removes the first unit of the array and returns the result. This is convenient for the first unit of the array to be processed independently.
CopyCode The Code is as follows: $ Tmparray = array ("1", "2", "3", "4 ");
$ Tmparray
// If the transfer parameter is directly assigned, garbled characters are generated!
CopyCode The Code is as follows: http_request.open ("Post", URL, true );
Http_request.setrequestheader ('content-type', 'application/X-WWW-form-urlencoded
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