What are the special characters "[]" and "" in PHP regular expressions? What are the specific operations? Why are they special characters? Let's take a look at the specific introduction.
There are two important special characters: "[]". They can
PHP include () and require () are two methods that contain external files. Many beginners may not understand the differences between the two methods. The following summarizes the differences between PHP include () and require:
1: loading failure is
PHP array functions are quite common, So I studied PHP array functions and shared them here, hoping to be useful to you. Today, we are going to learn about PHP array functions. arrays are a type of data that is frequently used. Learning to process
1. Do not translate html entities
A basic knowledge: All untrusted input (especially the data submitted by the user from the form) must be converted before output.
Echo $ _ GET ['usename'];
This example may be output:
This is an obvious security
For LearningAt first, I used unset with reference to other methods, but there was a defect. For example, $ a is an array:
$A=Array("Red", "green", "blue", "yellow ");
Count ($ a); // get 4
Unset ($ a [1]); //
Everyone knows that PHP object initialization: to initialize an object, use the new statement to instance the object to a variable.
Class foo
{
Function do_foo ()
{
Echo "Doing foo .";
}
}
$ Bar = new foo;
$ Bar-> do_foo
We are using1. Use mb_substr of the mbstring extension library to intercept the database without garbled characters.
2. Write the truncation function by yourself, but it is not as efficient as using the mbstring extension library.
3. If you only
What we want to introduce to you today is
// The PHP header function sends a 404 status code to the browser.Header ("HTTP/1.1 404 Not Found ");OrHeader ("HTTP/1.1 404 ″);
// PHP header function permanent redirectionHeader ("Location:
PHP function fgets -- read a line of description from the file pointerString fgets (int handle [, int length])
Read a row from the file pointed to by handle and return a string of up to length-1 bytes. When a line break (including the returned value)
Recently, when I set up a server, I suddenly felt how lamp works or how it works? I usually write programs and never think about how they work:
Working principle of PHP underlying layer
498) this. width = 498; 'onmousewheel = 'javascript: return
I have never paid much attention to it before. I have heard from my colleagues today and can check it out immediately. It is very powerful.Php configuration functions are several ini _ * functions, mainly for configuration file operations. In fact,
Php get_meta_tags Function
Get_meta_tags(PHP 4 and PHP 5)Get_meta_tags-extract all relay TAG content attributes from a file and return an arrayDescriptionArray get_meta_tags (string $ file name [, Boolean $ use_include_path = false])Open the file
Some netizens cannot leave the chat room through normal channels due to Line Disconnection or crashes, leading to abnormal display of online users! The solution is generally1. Create the number of online users file, which stores the id/pass/time of
Php generic tree classes can generate any tree structure
Php generic tree classes can generate any tree structureClass tree{/*** The two-dimensional array required to generate a Tree Structure* @ Var array*/Var $ arr = array ();
/*** The modifier
When learning PHP, you may encounter PHP configuration problems. Here we will introduce the solutions to the PHP configuration problems, and share them with you here.
1. All files in the unzipped php-4.3.6-installer are made to the C: php
For
In PHP 3.0, almost everything you write is an expression. The simplest but precise definition of an expression is "anything with a value ".
A simple example is constants and variables.
When you write "$ a = 5", you assign the value '5' to $ ′.
As a qualified
When designing a database, because each field represents different data meanings, the length of each field will not be exactly the same. In PHP, you can use the mysql_field_len () function to obtain the Field Length in PHP. The syntax
After four RC versions, the official PHP version 5.3.9 was released. The previous version was 5.3.8 of, which fixed the hash collision attack bug. In addition, there were a large number of bug fixes. Please Upgrade PHP 5.3 as soon as possible.
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