The principle of preventing a malicious page from being brushed is
Requires a validation string to be passed between pages,
Randomly generates a string when the page is generated,
As a must parameter is passed in all connections. This string is
Give the code:
Copy CodeThe code is as follows:
Introducing a database configuration file
Include (DirName (DirName (__file__)). \include\config.php ");
/**
*
* Generate a single HTML file for the articles in the database.
* @param Date $Date
*
The first type of code: less CodeThrough regular expression to obtain the real address of the Baidu network disk file, to achieve the effect of straight chain
Save the following code as downbd.php
Copy CodeThe code is as follows:
$canshu
When data is exported to Excel, the number format is not correct, generally divided into the following two cases.
1. Excel cell set length is not enoughWorkaround:
Copy CodeThe code is as follows:
In the excel.php file
$objActSheet = $objPHPExcel-
Spam is annoying, and the following is a way to automatically block bots from collecting email addresses from your website.
Copy CodeThe code is as follows:
function Security_remove_emails ($content) {
$pattern = '/([a-za-z0-9._%+-]+@[a-za-z0-9.-]+\
On the internet to see a very interesting php RMB amount to the Chinese capital of the function, its essence is the number converted to Chinese capital, test a bit, very interesting, casually lose a number, you can print it in uppercase, novice
1, first you have to make sure that your PHP version is not less than 5.1.4, but it is strongly recommended to use 5.2.3 or later
2. Ensure that your php.ini opens the following modules:
Extension=php_pdo.dllExtension=php_pdo_mysql.dll
3. Open the
Copy CodeThe code is as follows:
/**
* * An overview of an array
1. The nature of arrays: managing and manipulating a set of variables, batch processing
2. Arrays are composite types
3. You can store data of any length in the array. You can also
Phpexcel Save the Read cell information in memory, we can
Copy the Code code as follows:Phpexcel_settings::setcachestoragemethod ()
To set different caching methods, has achieved the purpose of reducing memory consumption!
1. The cell data is
Last year did a project, to the user upload image file list, when the user click on a file name, you can display this image.
Because to consider compatible with a variety of image formats, I used the GD library to determine the specific kind of
Configuring System Constants
1. Check and configure these preferences when the file system is working
When the file system is running, these default values will increase the security of the system appropriately, but the value of octal is always
Algorithm principle
If p represents the full arrangement of n elements, and Pi means that n elements do not contain the full permutation of element I, (i) pi indicates the arrangement of the prefix I in front of the permutation pi, then the full
Our PHP MongoDB can do almost all the functions that MySQL and SQL Server can do, this article will explain in detail
One, operator
Operators believe everyone must know, is equal to, greater than, less than, not equal to, greater than or equal to,
The difference between flush (), Ob_flush (), Ob_end_flush ():
First, the next buffer, it is a memory address space, for 4096 (1KB) "found in the php.ini configuration file output_buffering Configuration", PHP has a php output_buffering mechanism,
Need to use phpexcel this library
Copy CodeThe code is as follows:
$excelPath = ' Test.xls ';
$objReader = Phpexcel_iofactory::createreader (' Excel5 ');
$objReader->setreaddataonly (TRUE);
$objPHPExcel = $objReader->load
Algorithm Description:
⒈ starting with the first element, the element can be thought to have been sorted⒉ takes the next element and scans the sequence of elements that have been sorted from backward forward⒊ if the element (sorted) is greater than
The basic operation of inserting a sort is to insert a piece of data into the ordered data that is already sorted, thus obtaining a new, sequential data with a number plus one.
Algorithm Description:
⒈ starting with the first element, the element
1.php.ini inside Find Extension=php_mcrypt.dll, remove the front semicolon ";", restart Apache. Invalid (note: php.ini in Dinwos directory in Appserv)
2. Copy the PHP directory under Libmcrypt.dll to windows/system32 directory, restart IIS,
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