Anti-injection in PHP generally write a global file to filter special strings, this article summarizes a variety of PHP anti-injection function code, but also anti-SQL injection can be consulted.
For security, we used the following function to
SQL injection attacks are the most common means by which hackers attack websites. If your site does not use strict user input validation, it is often vulnerable to SQL injection attacks. SQL injection attacks are typically implemented by submitting
Many PHP developers use this MD () cryptographic function, but some of the references may not be known, so let's take a look at the parameters of the MD5 () function today.
GrammarMD5 (STRING,RAW)
MD5 () function computes the MD5 hash of a
Prerequisite is that we need to have the server's administrative rights, that is, you can modify the php.ini file, the following I would like to introduce the modification of PHP configuration file to prevent SQL injection method has to learn the
Ajax +php No Refresh page code we are here to use PHP+JS+AJAX implementation of data without refreshing page code OH.
Ajax +php Tutorial No Refresh paging codeWe are here to use php+ web effects +ajax Implementation of data without refreshing page
In PHP, the default can only upload 2MB size files, if you want to upload more larger files We need to modify some parameters, the following people to refer to.
Linux Systems
1,/usr/local/nginx/conf/nginx.confModify
Client_max_body_size
2,/usr/local/
PHP Excel import mysql first to download Phpexcelreader, and then look at a simple to read the Excel data and show that the example is to import Excel data into MySQL data, example three is the use of PHP import CSV to MySQL database.
PHP tutorial
Phpexcel is a PHP for Excel data table read and write a very good plug-in, let me introduce you to use Phpexcel read Excel and Import MySQL database method.
Example 1
code example
The code is as follows
Copy Code
PHP generated Verification code file is a learning PHP friends should know the technology oh, this can not only make your site security to improve some, you can also note some machine registration and other problems Oh, below we will look at a
First from the official website APACHE2.050, PHP5, MYSQL4.0.20, PHPMYADMIN2.57
Apache_2.0.50-win32-x86-no_ssl.msi
Php-5.0.0-win32.zip
Mysql-4.0.20d-win.zip
Phpmyadmin-2.5.7.zip
Operating system win2003 system disk: D-Disk
First step: Install Apache
How to use PHP in zip
The zip file feature allows you to read the zip file.-------------------------------------------------- ------------------------------InstallationFor the zip file function to work on your server, these libraries must be
Okay, let's take a look at the simplest php file Upload Example tutorial, we'll use Move_uploaded_file to upload local articles to the server.
Okay, let's take a look at the simplest php file Upload Example tutorial, we'll use Move_uploaded_file to
If you need to access a Microsoft SQL server or Sybase database under Linux, the following packages are recommended.
Sybasecommon http://download.sybase.com/pub/ase1192_linux/sybase-common-11.9.2-3.i386.rpm
Sybaseopenclient
MySQL can be connected to the Web in two ways via PHP, a MySQL-related function via PHP, and an ODBC-related function via PHP
The relevant functions are as follows:
MySQL function
Mysql_affected_rows: Gets the number of columns affected by MySQL
1. Description: Copy table (copy structure only, source table name: A new table name: b)
Sql:select * to B from a where 1<>1
2. Description: Copy table (copy data, source table name: A target table name: b)
Sql:insert to B (A, B, c) select d,e,f
1.REMOTE_ADDR: Browse the current page of the user's computer's IP address 2. Http_x_forwarded_for: Browse the current page of the user's computer Gateway 3. HTTP_CLIENT_IP: IP for Client
Use $_server["REMOTE_ADDR" in PHP to obtain the IP address of
Q. How do I get a random sort result?
A. To get a randomly sorted column, or to return a randomly selected column of x, you can use a random number. However, the RAND function can only return one result in a query. You can do an order by on the
There are many kinds of user login with my instance of the most basic user login run to the specified page this is not safe if the user know that you do not need to log on the address, the instance of the second use of the session is also more
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