When multiple people insert or update the same table at the same time, the same data may occur many times or some strange problems, you can use the mysql lock table mechanism to queue up to solve this problem. before inserting data in php, LOCK the
I. Introduction
If you know something about Unix/Linux, you should know that most of them come with C and C ++ compilers, GCC and G ++ respectively. Unix uses these compilers in many places such as program installation and Make. Use some Console
2. install and configure PHP:
I want to use Apache as my WebServer:One Note: This article mainly to install and configure the php-3_0_15-win32 version of PHP for example, and further explain, during which also added to the php-4.0b4-Win32 version
1.Error MessageWarning: Cannot send session cookie-headers already sentWarning: Cannot send session cache limiter-headers already sentAnalysis and SolutionsThe reason for this problem is that when you use session_start () in the program, the actual
I wrote several ID card functions, and I personally felt very useful. Especially in the online questionnaire survey, it is very useful to verify the ID card in my personal information, but there are few applicants, you can leave it in your own blog.
QQ host mounting is very popular now. Recently, I saw someone writing such a PHP code to implement QQ host mounting. I 'd like to share it with you.
PHP code:
$ Qq = "100000"; // qq number$ Pwd = "123456"; // Password$ Ch = curl_init
# 404.php, 8/10/2000.# Traps 404 errors and mails a notice to the webmaster.# Requires PHP 3.0 or newer, and mail capability on your system.## Copyright 2000 shaun@shat.net under the GNU Public License.# Disclaimer: I wrote this script for me, and
After a comprehensive understanding of regular expressions, let's take a look at how to use regular expressions in Perl, PHP, and JavaScript/"target =" _ blank "> JavaScript.
Generally, regular expressions in Perl are in the following
4.2 single line comment
A short comment can be displayed in a row and has the same indentation level as the subsequent code. If a comment cannot be written in a row, block comment should be used. There should be a blank line before a single line
6 if and else statements
The if-else statement should have the following format:
If (condition) {/* condition for Operations */Statements;}
If (condition) {/* condition for operations .*/Statements;} Else {/* conditions for Operations
6.5 for statement
A for statement should have the following format:
For (initialization; condition; update ){Statements;}
An empty for statement (all work is being initialized, condition judgment, and updated in the clause) should be in the
8.3 Functions
The method name is a verb. It is a combination of upper and lower cases. The first letter of the first word is lowercase, And the last letter of the last word is capitalized.Function run ();Function runFast ();Function getBackground ()
8.4 Variables
Except for the variable name, all instances, including Class and Class constants, are case-insensitive. The first letter of the first word is lowercase, and the first letter of the subsequent word is capitalized. Variable names should
9.1 Constants
The numeric constant located in the for loop as the counter value, except for-and 1, should not be directly written into the code.
9.2 variable assignment
Avoid assigning the same value to multiple variables in a statement. It is
6. Create dynamic imagesAs long as you install some third-party library files and have some geometric knowledge, you can use PHP to create and process images. In fact, this does not require much geometric knowledge, because I have not graduated from
3. Regular Expression DefinitionA regular expression (regular expression) describes a string matching pattern, it can be used to check whether a string contains a seed string, replace matched substrings, or retrieve substrings that meet certain
The previous article "talk about PHP syntax" has talked about PHP Data Types and expressions. Now let's take a look at the variables and constants of PHP.Let's take a look at this example first.
File: test. php
// This is a single line Comment
1. Replace I = I + 1 with I + = 1. In line with the c/c ++ habits, the efficiency is high.2. Use PHP internal functions as much as possible. Before writing a function, check the manual to see if there are any related functions.3. Try to use a single
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