This should be done with if (Isset ($_post[' submit ')) {
}
The difference between if ($_post[submit]) and if (Isset ($_post[submit)) when submitting a form
The first method will appear a warning, the second relatively more rigorous.
There is also
began to think that such a function seems difficult, before also done a encyclopedia of things, which also involves the function of classification, but not an infinite classification, but a simple implementation of a fixed level three classification,
The following are examples of implementations:
Copy CodeThe code is as follows:
/*
* Pseudo address Forwarding address (url_alter)
*/
Function Example_url_inbound_alter (& $path, $original _path, $path _language)
{
if (Preg_match (' |^article (/.*)
First use an INI file to set the size to be scaled, where the width or height of 0 is the picture zoomed in or out, all 0 or the original size, not 0 are stretched to the specified size.
Note: The INI file is interpreted as a comment file using PHP,
PHP provides an error suppressor ' @ ', and how does it prevent error output? When should I use it?
This is the two days some netizens mentioned the common problem, today, simply answer the whole, prepared Yimeimei flip.
How to handle the HTML
Initially intended to use a foreach history, but found no success, oo not pass, no way oo write ...
After the study decided to use for loop, the demo code is as follows:
Copy CodeThe code is as follows:
$blog =array (
Array
"Titledata" = "Titlemm",
The prototype of the Find function
Copy CodeThe code is as follows:
/**
* Returns the first record that meets the criteria and all associated data, and the query returns false with no results
*
* @param mixed $conditions
* @param string $sort
*
1. Download the following two files into the PHP ext directory and System32
Php_sqlsrv_52_ts_vc6.dll (thread safe)
Php_sqlsrv_52_nts_vc6.dll (non-thread safe)
VC6 for APACHE,VC9 for IIS
2. Modify PHP.ini
Extension=php_sqlsrv_52_ts_vc6.dll
3.
Copy the Code code as follows:
Mktime = Mktime ($hours, Minute,seconds,month,day,years)
$start _time = mktime (0,0,0,01,09,2010); Start time
$end _time = mktime (0,0,0,02,09,2010); End time
$times = $end _time-$start _time; How many seconds
However, because of the number of parameters of the phone, and the different parameters of the phone, so the parameter table structure is usually a vertical table (a parameter is a row), rather than a horizontal table (a parameter is a column), at
Here's the code:
First, back up the database and download to the local "db_backup.php"
Copy CodeThe code is as follows:
Setting the SQL file Save file name
$filename =date ("Y-m-d_h-i-s"). " -". $cfg _dbname." SQL ";
The file name that you
Some of the people who know the PHP language know that it contains a powerful library of functions. Let's take a look at the specific functions of PHP uploaded_files functions today.
In earlier versions of PHP, uploading a file was probably done in
Grammar
Date (format,timestamp) parameter description
Format required. Specifies the format of the timestamp.
Timestamp is optional. Time stamp is specified. The default is the current date and time
To find out the day before is time () -60*60*24;
A known method is to use Session_set_save_handler, take over all the session management work, usually the session information is stored in the database, so that the SQL statement can be used to delete all the expired session, Control the duration of
An array of PHP, plainly, is the associative data each array is saved in the form of [index, value]. Where the index defaults to a number starting at 0. When an index is not specified, PHP automatically generates an index starting at 0. When you
The following examples illustrate
Break is used to jump out of the current execution loop and no longer executes the loop.
Copy CodeThe code is as follows:
$i = 0;
while ($i if ($arr [$i] = = "Stop") {
Break
}
$i + +;
}
?>
continue
1. Using Print_r ($array/$var)Print is the meaning of printing, and R is taken from the word array, then the function is to print the set of contents, it can be printed array content, you can also print ordinary variables.
Print_r ($_request);
Print_
Here's a description.
1. Echoecho is a keyword in PHP that has no return value. In the notation, it can omit parentheses. The following code:
Copy CodeThe code is as follows:
Echo ' Test String ';
Echo (' Test String ');
2. PrintPrint is also a
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