For today's applications, the importance of journaling is self-evident. It is hard to imagine an application without any logging capabilities running in a production environment. The functions that a log can provide are varied, including error
Copy Code code as follows:
Function: Traverse and print all files in the specified directory
function Scan_dir ($dir _name, $dir _flag=1) {Static $FILE _count=1; Number of records file initial 1 directory name does not remember$FILE _count--
Beautiful point:1, multi-cross scene distribution;2, PHP new features-closure use, batch processing functions array_walk/array_flip use;3, bit operation & use case;
Usage scenarios:1, common additions and deletions to check (2 of the N-second-side
Duplicate data that begins with a number, such as:
Copy Code code as follows:
Array (
[0] => 100
[K1] => 100
[1] => 2123
[K2] => 2123)
This method can take the value of the number as key to remove, first the array in reverse order,
Sometimes because of the work, their own needs, we will go to browse different websites to get the data we need, so the crawler came into being, the following is my development of a simple crawler and encountered problems.
To develop a reptile,
The idea of realizing infinite pole column classification: Get the ID (that is, the parent ID) and then get the child ID (that is, the UID child ID) to the database as followsId:1 uid:0 I'm column 1.Id:2 uid:1, I'm column 2.Id:3 Uid:1 I'm a subclass
Today, I encountered the Resizeimage function of GD to process the thumbnails of the jpg suffix file to prompt the image is not a valid JPG image and error
Domestic online Search A lot of information did not find an effective solution, so
Email detection, password duplicate detection, can be used for form to send a variety of environments, such as sending feedback, registered account
Copy Code code as follows:
invalid name: We want names with more than 3
You can modify the php.ini file in the case of:
1, modify the php.ini in the
Copy Code code as follows:
Session.save_hander = Memcache;
Session.save_path = "Tcp://host: port number";//For example: Session.save_path = "tcp://127.0.
Not much to say, the code sent on:
Copy Code code as follows:
function Pinyin ($_string, $_code= ' gb2312 ')
{
$_datakey = "A|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao
This paper analyzes the method of executing the PHP script with parameters and obtaining the parameters based on the command line. Share to everyone for your reference, specific as follows:
Why do we run PHP scripts at the command line?
Personal
This article describes the Win7 installation of the PHP framework Yii method. Share to everyone for your reference, specific as follows:
Someone asked me win7 installation Yii always error, spent 10 minutes installed, now do the self-learning
This implementation of PHP export Excel file using PHP Open source program phpexcel, some key code to share with you, the specific content as follows
1001, ' username ' => ' Zhang Fei ', ' Password ' => ' 123456 ', ' address ' => ' three
This example describes the namespace use usage in PHP. Share to everyone for your reference, specific as follows:
Now say this feeling a bit outdated, but feel the use of namespace people still not much, estimates or because it is not used to it.
This example describes how PHP detects whether a user is shutting down a browser. Share to everyone for your reference, specific as follows:
1, Example 1
echo str_repeat ("", 3000);
Ignore_user_abort (true);
MyLog (' online ');
while (true)
When doing development, it is possible to forget some technical details. These details can be very serious consequences, such as the site was injected, the site crashed and so on. Now let's summarize some of the "traps" in PHP that are likely to be
The example in this article describes a simple way for PHP to handle special characters entered in a form. Share to everyone for your reference, specific as follows:
";
? >try again
Example:
Your Name:
The example of this article is about how to achieve the original scale of PHP to generate thumbnails. Share to everyone for your reference, specific as follows:
$y) {
//Picture wider than high
$SX = ABS (($y-$x)/2);
$sy = 0;
$THUMBW = $y;
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