This article will show you how to configure session details in php. ini in php5, including path and other related operations. For more information, see.
Some session settings in php. ini affect the use of the session function. Take the php5 version
The following describes how to set the China Time Zone in date_default_timezone_set. If you need a simple function, refer to it.
Date_default_timezone_set-sets the default time zone used for all date and time functions in a script.
Syntax
Bool
Constellation judgment is very simple. We need to calculate all the time periods of each week, and then obtain the date for query. Below I will give you two examples. If you need them, you can refer to them.
Constellation: I wrote it according to
In mysql, if we want to use PHP to CREATE databases and tables, we can directly use mysql_query () to execute the mysql table creation command, create database database_name.
The details are as follows:
To allow PHP to execute the preceding
There are many url Processing functions in php, such as http_build_query, compact, urldecode, urlencode, parse_url, rawurldecode, and so on.
Http_build_query
(PHP 5) http_build_query-request string generated after URL-encode
The Code is as
If we use php to obtain the QQ user name and online status QQ does not provide us with an api interface, if we want to obtain it, we can use QQ space or QQ web edition chat.
QQ returns different images to indicate online or offline, and the icons
The following provides three generated reduction codes, which have good compatibility. You can also customize the height and width.
Function imageresize ($ srcfile, $ tow, $ toh, $ tofile = "")
{
If ($ tofile = "") {$ tofile = $ srcfile ;}
$
This article describes how to generate a png thumbnail program with a transparent background in php. to process this in php, we only need to use imagealphablending ($ thumb, false); and imagesavealpha ($ thumb, true); then, let's look at the program.
This article introduces two types of database record filing code, one is a common database backup class written in php, the other is an automatic and scheduled mysql database backup code provided for linux friends. If you need it, you can refer to
In php, sometimes we need to replace the table prefix in the database, but it does not suffer from changing the prefix for tables one by one. Below I write a php program that replaces the database table prefix in batches by mysqli, I hope some
This article will introduce you to a php + mysql Article browsing times Statistics and release time instance. If you need this, please refer to it.
A web page displays the "File Upload time" and "browsing users", which not only records the history
CSV is the abbreviation of comma-separated values. It is usually a plain text file. We recommend that you use WORDPAD or notepad (NOTE) to enable it. Then, save a new file and enable it in EXCEL. You can also open it in excel, just like in
The verification code can prevent some users from repeatedly submitting the code to guess the password or use brute force tools to guess the password. After the verification code is added, it makes them more difficult, next I will provide a
When using Baidu and google, we will find that there will be related prompts as long as we enter one word, which improves the website experience, next, I will share with you an example of an automatic prompt box in the drop-down menu of Baidu Google
The topic of script security seems to be endless forever. If you often go abroad to various types of bugtraq, you will find that more than half of them are related to scripts, such as SQL injection, XSS, Path Disclosure, remote commands execution is
To prevent page attacks, you can include Attack Files in the header of the page, just like general anti-injection files. We can do this in three cases:1. Reference in each file. This is acceptable, but it is inconvenient if a website contains
Malicious refresh means to constantly refresh the submitted page, resulting in a large amount of invalid data. The following is a summary of php's methods to prevent malicious page refreshing:
A verification string must be passed between pages,A
There is a common mode and Security Mode in php. Now most data users directly use the php common mode of the application, because many functions are limited after the security mode is configured, the following describes how to configure the security
When using xml-rpc, the server obtains client data mainly through the php input stream input instead of the $ _ POST array. So here we will mainly discuss php input stream php: // input
For a php: // input introduction, the PHP official manual
4.8.1 SPML-included File FormatThis type of file is analyzed as an HTML file and embedded like an SGML annotation (embedded)Special commands. The general syntax of the command is:The value here is often included in double quotation marks. Many
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