http://blog.ddian.cn/?post=923
Class ender{
private $enkey;//Key used for encryption and decryption
The construction parameter is the key
Public function __construct ($key = ") {
if (! $key) {
$this->enkey=
file 1: "error.class.php" rewrite error handling, file-type log output, there will be two time, the first is GMT, the second is Beijing time, followed by the error message, use only need to include this file on it. Of course, you can change the file
PHP code implementation of the file or image upload, for everyone to analyze the principle of uploading, and give specific code, suggest beginners to learn from the reference of the friend.1, create a File upload Form 2, allowing users to upload
For everyone to introduce the PHP development of file upload class and image processing class, there is a need for friends, you can refer to the study.PHP implementation of the file upload is relatively simple, if there is an efficient PHP file
01 Loan Platform January 7 issued the notice:1, Heng Xinfeng Guarantee, Shenzhen Luohu Office Mortgage Loan 680,000 Yuan (comprehensive credit 5.5 million, third), the annual 18.5%, the period of one months, the expiry of a debt, January 7 10:30
When it comes to the question of single quotes when MySQL queries or inserts data, we use up to three functions that are mysql_real_escape_string, addslashes, and mysql_escape_string to deal with related problems.This article mainly introduces mysql_
Sometimes the PHP page consumes a large amount of memory, that is, some too large, how to solve it? This paper provides a simple and effective solution for everyone's reference.Cause Analysis: PHP page consumption of the largest internal presence
Header ("Location:http://www.php.net");
?>
Copy Code forces users to get the latest information each time they access the page, rather than using a cache that exists on the client.
Tell the
This section for you to introduce PHP error handling, in any programming language, the error of the capture and processing, are very important, it is recommended that you firmly grasp.This piece of content, we show you the usage of PHP error
To take the file extension
by http://bbs.it-home.org
$file = "/home/jbxue/file_20130322.txt";
for ($i =1; $i
$func = ' Get_file_ext_ '. $i;
Var_dump ($func ($file));
}
function Get_file_ext_1 ($file) {
Return
When developing a Web application, in order to reduce I/o overhead of the read-write database, some configuration information is often stored in flat files such as: Xml,json, and then manipulated by scripting languages such as: Php,javascript.There
This section for you to introduce PHP arrays, arrays in PHP programming is very important, with a lot of places, it is recommended that you take good control.1. Array definition:
[0]: The subscript that represents the array, or the keyword $arr[
This section introduces you to the For loop Print Hollow diamond, for loop application example, for everyone to learn the reference.In the previous section we introduced the PHP for loop, and this section looks at a few specific examples. Ideas: 1,
Tree-type directory structure template program
Menu Catalog Library Field Description:
MENU_ID menu item ID
Menu Name
Menu_grade Menu Level 1 Main Menu 2 for level two menu ...
Menu_superior first-level menu ID number
The first time here, this code is mainly PHP template engine technology research, currently only compiled version, I hope you will provide advice and optimization skills three file composition, do not know how to file form, can only copy, sorry!
PHP implementation of the image upload code, you can determine the size of the file, type, by the date of the day and minutes to generate the file name, suitable for beginners to refer to friends.The code is as follows.
$file _size_max) {echo "
PHP upload files and generate thumbnails of the code, divided into single-file and multi-file upload, and can generate thumbnails, really good, it is recommended that you refer to the study.The complete code is as follows.
*/function
This article implements a simple PHP class that lists all files under the specified directory in the right-type structure, and interested friends can look at them.The tree structure lists all the files in the specified directory, so that all the
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