Introduction to the 1.php release
PHP versions of the difference between the PHP version is generally VC6 and VC9, thread safe and non thread safe, VC6 is legacy Visual Studio 6 compiler,
is compiled with this compiler, VC9 is the Visual Studio
The first two functions are used to process the db.
First, the MYSQLI connection is a permanent connection, and MySQL is a non-permanent connection. What do you mean? The MySQL connection will reopen a new process whenever it is used for the second
curl_setopt(PHP 4 >= 4.0.2)curl_setopt--Set an option for the curl call
descriptionBOOL curl_setopt (int ch, string option, mixed value)
The curl_setopt () function sets options for a curl session. The option parameter is the setting that you want,
After the variables of PHP are declared and assigned, the variable names exist in the symbol table, and the values and class information exist in Zval, and the zval contains four variables.
Is_ref,refcount,value,type,zvalThe source code is as
PHP handling of case-sensitive issues is messy, writing code may occasionally problem, so here to summarize.
But I'm not encouraging you to use these rules. We recommend that you always adhere to the "case sensitive" and follow the Uniform Code
Ps:1. Capturing PHP syntax errors
2. Critical Error
These two types of errors cannot be caught with normal set_error_handle, which is a technique for capturing such errorsCopy the Code code as follows:test.php pageerror_reporting
Not much nonsense, on the code
Copy CodeThe code is as follows:
Gets the start time and end time of the week of the specified date
function Getweekrange ($date) {
$ret =array ();
$timestamp =strtotime ($date);
$w =strftime ('%u ', $timestamp);
$ret
PHP provides two ways of working with regular text, one for Pcre (the Pcre library is a set of functions that implements the regular expression pattern matching functionality that is slightly different from the syntax and semantics of Perl 5 (see
Copy CodeThe code is as follows:
/**
* Generic tree class, which can generate any tree-type structure
*/
Class Tree
{
/**
* 2-dimensional array required to generate the tree structure
* @var Array
*/
var $arr = array ();
/**
* Create a tree
Copy CodeThe code is as follows:
function Encode_pass ($tex, $key, $type = "encode") {
$CHRARR =array (' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' g ', ' h ', ' I ', ' j ', ' K ', ' l ', ' m ', ' n ', ' o ', ' P ', ' Q ', ' R ', ' s ', ' t ', ' u ',
The header function of PHP can be used to implement META tags in HTML code with very little code.
here only to use the header function to do the page jump
1. Code for page jumps in HTML codeHTML Meta Refresh and jump (redirect) pageRefresh
First, IntroductionProduct classification, multi-level tree structure of the forum, mailing lists and many other places we all encounter this problem: how to store multi-level structure of data? In the application of PHP, it is usually a relational
Unable to empty the contents of the folder can only empty the specified link cache
Copy CodeThe code is as follows:
function Clearvarnish ($ip, $url, $host =null) {
$errstr = ";
$errno = ";
$varnist _arr = isset ($host)? $host: C (' varnish_list '
HP does not have a built-in method to determine whether an array is indexed, and it simply implements one, usage:
Copy the Code code as follows:
echo Is_assoc ($array)? ' Indexed array ': ' is not an indexed array ';
The IS_ASSOC function is as
Why do I need debugger?
Many PHP programmers debug using Echo, Print_r (), Var_dump (), printf () and so on, in fact, for developers with a richer development experience these are enough, they can often in the process of program execution, By
The use of Array_multisort
first, look at the simplest case. There are two of arrays:$arr 1 = array (1,9,5);
$arr 2 = array (6,2,4);
Array_multisort ($arr 1, $arr 2);
Print_r ($arr 1); The order to get is 1,5,9
Print_r ($arr 2); The order to get is
The following example looks at the specific differences between the three functions, where var_dump and var_export are less useful, but they are very similar to each other. So you can look at:
Copy CodeThe code is as follows:
$a = Array (1,1,32,322
Copy CodeThe code is as follows:
//========================== Definition Redirect () Start =========================///**
* Defines the redirect () jump function, which is used to jump to the specified page as required after user action
*
* @param
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