SQL statements to be executed//single $sql= "Select Id,name from Tbl_user where id=1";//Multiple data//$sql = "Select Id,name from Tbl_user";// Call the conn.php file for database operation require (' conn.php '); Prompt Operation success
The definition of the PHP regular expression:
A syntax rule that describes the pattern of character arrangement and matching. It is used primarily for pattern segmentation, matching, finding, and substitution of strings.
Regular functions in
To display a database or table:
Show databases;//can then use database_name;
Show tables;
Change table name:
ALTER TABLE table_name rename new_t;
To add a column:
ALTER TABLE table_name ADD column c_n column attributes;
To delete a column:
ALTER
PHP make page List $page/$pages'. $i. '
ID
article title
/** Created on 2010-4-17** Order by Kove Wong*/$link =mysql_connect (' localhost ', ' root ', ' haoxiazai1987 ');mysql_select_db ('
PHP Bulk Get checkbox value
1. Naming
2. Use
When the plan is part of a SQL instruction: if the field that participates in the control is numeric, the
if (! empty ($_post[' checkbox '))) {
$expr = Join (",", $_post[' checkbox ');
$sql = "SELECT *
PHP Download remote file class, support for the continuation of a breakpoint download, the code contains specific invocation instructions. The main program is to use the HTTP protocol to download files, HTTP1.1 protocol must be specified after the
The code is as follows
function Funcmtel ($STR)//Mobile phone number regular expression test
{
Return (Preg_match ("/(?: 13d{1}|15[03689]) d{8}$/", $str))? True:false;
}
Test
18678785887
Return to
False
Cause analysis, see the discovery above is
We introduce the PHP pre-defined variables that are often used in PHP learning, and can obtain information such as user sessions, user operating system environments, and the environment of the local operating system through predefined
As a phper, we in the development and learning PHP process, it is inevitable to accept the processing of form data, but the processing of the form there will always be a problem, disturbing everyone, refresh the page repeatedly submitted questions.
1, the use of ++i (take A=++i, i=2 as an example)
The I value is first added to 1 (that is, i=i+1) and then assigned to the variable a (that is, a=i),
Then the final a value is equal to 3, and the I value equals 3.
So a=++i equivalent to i=i+1, a=i
The HTML static page is generated when the article is added, but if you want to delete the article, the HTML static page generated when the article is added should be deleted at the same time, otherwise it becomes redundant file, so we should delete
Open a command prompt cmd.exe
E:wampbinphpphp5.2.6>php.exe a.php 11
11 is the pass parameter
Get
if ($argv [1]) {
$_get[' id ']= $argv [1];
}
echo $id =$_get[id]+1;
You can change the a.php to your file name, note the directory structure
I use
Add the. htaccess under the project.
The contents are as follows:
Deny from all
Options-indexes
Options +followsymlinks
# for security reasons, Option FollowSymLinks cannot is overridden.
# Options +followsymlinks
# Options
1. Use the Ip2long () and LONG2IP () functions to convert the IP address into an integer store into the database. This approach reduces storage space to nearly One-fourth (char (15) of 15 bytes to reshape 4 bytes), calculates whether a particular
When we need to collect a webpage content on the network, if the image on the target website does the anti-theft chain, the images we collect directly are not available on our website. Then we use the program to download the image on the target
"Wind code generator [Firecode Creator]" is a variety of database-based program code generation software, can quickly build data information: Add, edit, view, list, search function. ASP, ASPX Web programs,. NET general three-tier framework web
How do I get my local Apache server to support the ". htaccess"? In fact, simply modify the Apache httpd.conf settings to allow Apache support. htaccess, take a look at the operation
Open a. httpd.conf file (where?) In the Conf directory of the
Catch error, cannot use try{...} catch () {} way, PHP inside the try{...} Catch is what you need to throw an exception to catch, which is different from other languages.
Second, you can use the following method to achieve the same
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