When we write data to mysql, for example:
Copy codeThe Code is as follows:Mysql_query ("update table set 'title' = 'kuhanzhu's blog '");Then an error occurs. Like asp, databases are allergic to single quotes. Addslashes has the longest face at this
Two-dimensional arrays are often used in PHP development, but their sorting is not as convenient as a one-dimensional array with built-in functions. We need to write a function to sort two-dimensional arrays, here, UncleToo will share with you a PHP
Code:Copy codeThe Code is as follows:/*** Think of the middle as a sliding fixed-length ruler.** Consider $ this-> _ totalShowPages as a fixed-length ruler that can be slide,* Then $ this-> _ totalPages is a block with a given length.* Slide the
There are many ways to verify the email address. On the Browser Side, js mailbox verification can be detected through regular expressions.
For example:Copy codeThe Code is as follows:Function isEmail (email ){Return/^ ([a-z] | \ d | [! # \ $ % & '\ *
PHP uses the super global variable array $ _ FILES to record file upload-related information. before uploading a PHP file, you can adjust1. file_uploads = on/off
Whether to allow file upload through http
2. max_execution_time = 30
The maximum
1. id2. goods_id product ID3. session_id shopping cart ID4. goods_sn product code5. goods_name Product Name6. shop_price7. The real price of goods_price (the difference between shop_price and shop_price is that when the discount is made, shop_price
Truncates a Chinese character string ** by truncating a function with a specified length. This function can automatically determine Chinese and English characters, no garbled characters ** @ accesspublic * @ paramstring $ str the string to be
Both Session and Cookie are used to save user information, but the difference is that the Cookie is the stored client, and the Session is saved on the server. Compared with cookies, sessions are stored on the server, which is relatively secure.
The function of this paper is to avoid the garbled problem caused by the use of UTF-8 encoding in an all-round way, does not contain the specific garbled solution and the content of encoding conversion. For a deep understanding of UTF-8 encoding,
When using MySQL, you must pay attention to security issues. The following are 23 Notes for MySQL: 1. If the connection between the client and the server needs to span and pass through an untrusted network, you need to use an SSH tunnel to encrypt
Use mysqladmin, which is a special case stated above. After entering this command, you need to enter the original root password, and then the root password will be changed to mypasswd. Mysqladmin-uroot-ppasswordmypasswd method 1
Use phpmyadmin,
Convert multiple records using number segments after elimination into one row for display, that is, use SQL to convert rows and columns. if it is implemented through programming, it is not difficult to achieve these two points, but it is implemented
Today, due to work needs, I configured the Mysql5 environment on my computer and installed a phpMyAdmin administration tool. after installation, I found that I entered Chinese characters in phpMyAdmin, the following error is always prompted:
The Java Language is powerful, so the function of calling Java in php in many cases will be very useful. There are two methods to call the Java language in php: one is to use the Java expansion module in php, and the other is to use the SJOP
A symbol can be used to process numbers, strings, and other conditions that require computation. The operator numbers in php are similar to those in C. for experienced programmers, they should be able to smoothly grasp the operator numbers in
Some useful functions can be retained as source code to avoid repeated writing in the future. File reading function // file reading function functionPHP_Read ($ file_name) {$ fd = fopen ($ file_name, r); while ($ bufline = fgets ($ fd, 4096 )) {$
For long-running server daemon, including web servers such as Apache and expanded php modules, the process is often designed to run for a long time. As the OS cannot liquidate memory applications, any program leakage, no matter how small, will lead
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