1, this
1. to use this, you must be in a situation like this. Otherwise, it will report an error: Fatal error: Using $ this when not in object context.2. this can call methods and attributes in this class, or call methods and attributes that can be
First, explain separately,
Trim filters both ends of a string,Rtrim filters the tail of the string, = chop ()Ltrim filters the string header.
You can only use str_replace to filter the middle keys in a string.For example,
PHP code
Copy codeThe
First download the latest vld extension:
Copy codeThe Code is as follows :~ /Public_html/php-5.3.13/ext> wget http://pecl.php.net/get/vld-0.11.2.tgz
~ /Public_html/php-5.3.13/ext> tar zxvf vld-0.11.2.tgz
~ /Public_html/php-5.3.13/ext> vld-0.11.2/cd/
Remember, you can use it directly when you need to use it in the future, or you can click here to view this article.
Copy codeThe Code is as follows: // Method 1:
Function extend_1 ($ file_name)
{
$ Retval = "";
$ Pt = strrpos ($ file_name ,".")
Algorithm principle
If P is used to represent the full arrangement of n elements, and Pi is used to represent the full arrangement of n elements that do not contain element I, (I) pi indicates the arrangement of Pi with the prefix I. The full
Is_numeric: checks whether it is a numeric string, which can be a negative number or a decimal number.
Ctype_digit: checks whether all characters in a string are numbers. Negative and decimal digits cannot be detected.
Note that the parameter
These words have special meanings in PHP. Some of them are functions, some are constants ...... But they are not. They are only part of the language structure. You cannot use any of them as constants, method names, or class names. However, they can
Which of the following functions is used to define a top-level exception processor?
Set_exception_handler ("My_exception ");
Here, My_expection is a developer-defined exception handling function, which is a top-level exception processor. Only when
Array_count_values () Definition and usage
The array_count_values () function is used to count the number of occurrences of all values in the array.
This function returns an array. The key name of the element is the value of the original array,
I. All judgments are in Chinese.
Copy codeThe Code is as follows: $ str = "'127 is ";
If (! Eregi ("[^ \ x80-\ xff]", "$ str ")){
Echo "all Chinese ";
} Else {
Echo "not ";
}
2. Identify Chinese CharactersCopy codeThe Code is as follows: $
First view results --
The page source code is as follows:
Analyze the code. After checking that the index_config.php (Smarty connection file) and index. php files are correct, let's take a look at the template file. The possible reason is
The mcrypt extension cannot be loaded. check the PHP configuration.
In the following situations, the error message "unable to load mcrypt extension, check PHP configuration" may occur when you run the phpmyadmin program.
1. the Mysql database
The main topic is
Variable Extension System in. php Strings
More data types available in. php
. Type conversion
. Input and use variables and constants
. How to Build expressions and operators required to build expressions in php
. Use the available
Array getimagesize (string $ filename [, array & $ imageinfo]) to get the image size
Resource imagecreatetruecolor (int $ x_size, int $ y_size) creates a true color image.
Resource imagecreatefromjpeg (string $ filename) creates an image from a JPEG
Copy codeThe Code is as follows:/* data types are converted to each other
* Forced conversion
* SetType (variable, type); // int, integer, float, double, and so on.
* This function changes the type of the original variable. You can use var_dump ()
Copy codeThe Code is as follows: /* Function Definition:
* 1. The function is named
* 2. Independent code segments
* 3. The function executes a specific task.
* 4. You can return a value to the program that calls it.
*
* Advantages of functions:
* 1.
Copy codeThe Code is as follows: /*
* 1. array Overview
* 1. The essence of Arrays: managing and operating a group of variables, batch processing
* 2. array composite type (multiple objects can be stored)
* 3. Data of any length or type can be
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