The Define () function defines a constant.The purpose of the Define () function is to define a constant.
Constants are much like variables, except for the following differences:constants [constant] have a lot in common with variables [variable], so
UNIX Installation of PHP module, you need to recompile php,windows installation template, just php.ini in the configuration to open the corresponding DLL, for example, need to join the GB library support, you need to set the following:Extension_dir =
The use of PHP empty (), isset (), and Is_null () has been discussed a lot, and much of the information may not be clear. Repeat here again, but not from the concept to say, directly using the program examples to speak, should be more profound
Many times we need to encrypt and decrypt data, such as some data that needs to be stored in cookies, but not easily accessible to users, and then we need to encrypt the data to be stored in a cookie and then decrypt it when we need to use it.
The
Constants can be understood as values that are invariant. After a constant value is defined, it cannot be changed anywhere else in the script. A constant is made up of English letters, underscores, and numbers, but numbers cannot appear as first
PHP comparison operators appear to be too often, especially = =if (a = = b) {Do something}But have you really mastered the = =? The details are important!Look at the code below and say what you think is the right answer.Var_dump (' 123fg456 ' ==123);
Last time we talked about RefCount and Is_ref, here's a memory leak.
Copy Code code as follows:
$a = Array (1, 2, & $a);unset ($a);
in the old version of PHP, there will be a memory leak, the analysis is as follows:
To perform
This article describes the PHP screen filter to specify the keyword method. Share to everyone for your reference. The specific analysis is as follows:
Realize the idea:
First, the key words written in a text file, each line one, the number of
The Title does not know if it is appropriate. The specific situation is this: the site to increase the keyword link function, and then need to make a regular expression of the content of the article to match and replace, and then use the
This example describes the use of Phpexcel read-write Excel (xls) files in PHP, very practical. Share for everyone to use for reference. The specific methods are as follows:
Many PHP class libraries in the reading of Chinese XLS, CSV file will have
Today I learned the most basic PHP conditions and looping statements, the last teacher raised a few questions, one of the implementation of the hollow pyramid image is more fun.
What the teacher wants us to achieve is:
*
* *
* * The Hollow
Iterator (iterator) mode, which provides an abstraction on a common process: an iteration over a set of objects (or scalars) that are located in an unknown part of the object graph. There are several different ways to execute an iteration: Iterate
This article illustrates the usage of the character encoding conversion function in PHP, and shares it for everyone's reference. The implementation methods are as follows:
Generally speaking, in the Web page program, especially involves the reading
2 PHP Test filesserver.php
Copy Code code as follows:
Phpinfo ();
Ensure that the client is not timed out when connected
Set_time_limit (0);
$ip = ' 127.0.0.1 ';
$port = 1935;
/*
+-------------------------------
* @socket the
This article describes the JavaScript and PHP to verify the user input URL is the correct way to share with you for your reference. The specific methods are as follows:
1.javascript Detect URL address validity:
Copy Code code as follows:
However, whether IIS or Apache by default only compressed HTML class static files, for PHP files need module configuration to support (iis7.5 in dynamic + static compression can also be), so the use of PHP itself to achieve gzip effect also become a
PHP to create a desktop shortcut is so simple, we build when you change the site you want to generate.
Dianji.html Code:
Copy Code code as follows:
Generate left Shortcut
shengcheng.php Code:
Copy Code code as
Description:Because of the recent work and work relationship, need to develop a Linux run under the Web application, need to do some of the current more popular PHP framework to do an understanding and evaluation, the following article is the author
First look at the key name is string, the difference between the two:
Copy Code code as follows:
$arr 1 = Array (' A ' => ' PHP ');
$arr 2 = Array (' A ' => ' JAVA ');
If the key name is a character and the key name is the same,
This article describes the PHP implementation of the CAPTCHA authentication code class, in the PHP program design has a very wide range of applications. Share to everyone for your reference. The specific methods are as follows:
The Authentication
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