In PHP file File_put_contents function is able to write our string to the file Oh, this and PHP fwrite file is a bit the same, let me look at file_put_contents usage and fwrite differences.
The PHP file_put_contents () function is the most
User login is the user entered the user name password click on the login page does not refresh and then use Ajax submitted to the background program to determine if the login successfully returned TRUE or related user information, so that the user
Configuration process:
(a) http.conf
To run PHP directly as a module of Apache:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php. php
In the Apache directory set up a WWW directory for storing site files, in
A good use of PHP to export MySQL database backup to SQL example, I hope it will be helpful to everyone.
Database backup with PHP code can make the management of the site very convenient, we can directly into the background operation to complete the
An entry-level PHP basic grammar and data type article, I hope you can provide some help PHP beginners OH.
PHP basic syntax and data types:
(1), PHP basic syntax:
1, htm and PHP mixed2, a statement to; (End of semicolon)3, how to define a variable,
Replace the string in PHP we will use the Str_replace function, this function can also use regular, the following small series to introduce you to replace some characters in the string or replace the first occurrence of the character instance.
Now
To set PHP survival time we can use the Session_set_cookie_params function or modify the php.ini file Oh, the following small part to introduce.
The first method: Session_set_cookie_params
function prototype void session_set_cookie_params (int
Export the contents of MySQL database to Excel we can simply implement the MySQL export Excel file by using the header output CSV format document, let's take a look at the example below.
The core code is here.
The code is as follows
It should be said that the use of Phpexcel plug-ins to implement the import and export of databases, this article is mainly to tell you to import Excel into the MySQL database method.
Download First
Download Phpexcel file, address: phpexcel.codeplex.
In PHP, the session is a server global variables can be implemented between the page passed, so the session is often used for server-side user login verification, session security is very high, let me introduce the basic knowledge of PHP
This article to introduce an article about PHP to the picture with a gray transparency effect, I hope this method for you to help the reunion Oh.
Principle:
1. First calculate the size of the original image2. Create a translucent picture of the same
The remaining time is when an article is published to now for a few minutes or a few days, this in many blog forums to see the article published 1 days ago, below I introduce two instances
Convert two date-formatted strings to UNIX timestamps, then
This is a PHP mysql_connect function to implement the connection MySQL database prompt conditions to your PHP have Php_mysql.dll and Libmysql.dll and php.ini; Extension=php_mysql, Remove the previous ";" , OH.
The code is as follows
This article to introduce the PHP and Orace database to implement the paging function of the database, the following students can take a look at it.
The code is as follows
Copy Code
Include
PHP Connection MSSQL Novice Often encounter this problem: Database inside the nvarchar field data all normal, but with PHP query out but found only 255 length, we all know, in MySQL, the length of the varchar is only 255, but MSSQL is not , PHP will
This article shares an article about the PHP MySQL replacement string method, the need for students can refer to.
The code is as follows
Copy Code
function replace () {$sql = Db_query ("Select
This article to introduce a PHP $_get $_post filter SQL injection program code functions, I hope that some of the functions to help friends, this function can only filter some sensitive SQL commands, such as id=1 this people still need to filter
The role of Open_basedir is to specify the directory location, which means that the files that PHP can open are restricted to the specified directory tree, including the file itself, and are not affected by security mode.
The following is the
In the form we have a method property, he can let the form is post and get, in PHP should use the corresponding get,post to receive, let me introduce the method parameter description
1. It was used before, when the form form post commits, the URL of
Verification code can prevent some users repeatedly submit to guess the password or the use of brute force tools to guess the password, we added a verification code after they added a lot of difficulty, below I provide a program based on the session
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