Thank you, Mr. Cao... It mainly tests multi-level usage exceptions. Note the bold words in blue. Use c1 of c in try catch on the page, b1 of B in c1, and a1 of a in b1.
The default value is: a1 throws an exception, b1 captures the a1 exception, and
The verification code is required for background login, and SessionID is required for foreground user tracking. of course, the default PHP will have a SessionID after the Session is enabled, but I need my own, and can be stored in the database, then
Let's take a look at the source code of excellent online programs, analyze the advantages and disadvantages, and quickly improve our level. The following is an excerpt:
If we design the topic table and reply table, the common practice is as follows.
Sometimes we need to know some situations in the mysql database. Fortunately, php provides some built-in methods and functions.
The code is as follows:
@ Mysql_connect ("localhost", "root", "1981427") // you must connect to the database server
Create a directory using the mkdir () function. If yes, true is returned. otherwise, false is returned. Usage:
Mkdir (path, mode, recursive, context)
Parameter description
Path is required. Specifies the name of the directory to be created.
Mode
In a user-defined function, a local function range is introduced. By default, any variable used in a function is limited to a local function.
The code is as follows:
$ A = 1;
Include 'B. Inc ';
?>
The variable $ a will take effect in the
Today, a friend asked me how to use str_pad. he said that many of the online documents were taken directly from the manual. so I will write the details. the str_pad () function is used to fill another specified string with a string to the specified
Mssql outputs data in the system time format by default. you can adjust the system time format to solve the problem. of course, the solution is flexible in the program, for example:
"Select convert (char, date field, 120) as date2 from
Php verification code production principle analysis.
1. Generate a random number
Use the for loop to generate several random numbers.
Use a random function to generate a random number within the specified range. For example, rand () generates
The length of a piece of text to capture a certain physical length display, note that to intercept is not the number of bytes of the string, the UFT-8 of the encoding of Chinese characters is 3 bytes or 4 bytes, when displayed, the Chinese character
Open_basedir: restrict the files that can be operated by users to a directory. The following is the original description and default configuration in php. ini:
; Open_basedir, if set, limits all file operations to the defined directory
; And below.
PHP extensions are mainly divided into three types: external modules, built-in modules, and zend extensions. I have written an external module extension. now I am looking at the mysql extension in the PHP source code. it can be integrated into PHP,
In PHP, how does one redirect a page to another? Three methods are listed here for your reference.
1. use HTTP header informationThat is, use the php header function. The HEADER function in PHP is used to send control commands that should have been
Because I recently want to create something similar to a professional search engine, I need to capture all the hyperlinks on the web page. Let's test whether the following code can target all the standard hyperlinks. Test the regular expression
In fact, this leads to the problem of server output control and browser cache, which is a bit complicated and will be studied again later. IE6
When uploading and generating a thumbnail, the link displayed by the thumbnail is as follows;
The code
For beginners of php, it is often seen that there is an at (@) symbol in front of a function name, but they do not know its role and usage. after removing it, it seems that it has no effect on the program, I am very confused. Simply put, @ can
PhpmyadminMySQL encryption configuration method phpmyadmin
The following uses phpmyadmin-2.6.1.tar.gz as an example.
Decompress phpmyadmin-2.6.1.tar.gz to/usr/local/apache2/htdocs,
Get the folder phpMyAdmin-2.6.1 and rename it to phpmyadmin
Common functions used in php to calculate the string length include strlen and mb_strlen. The following is a comparison of the two functions (encoding method UTF8)
Comparison between strlen and mb_strlenWhen all the characters are English characters,
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