Example of php compression and decompression class PclZip
Require_once ('pclzip. lib. php ');
$ Zip = new PclZip ("archive.zip ");
$ V_list = $ zip-> create ($ _ SERVER ['document _ root'],
The backup database is an SQL file.
This is an SQL file that backs up all tables in a specified database and can be downloaded.
/****** Back up the database structure ******/
/*
Function name:
Share a piece of collection program code
I can see that some people always ask curl questions. I have nothing to do with a small program to collect the Forum in the past two days. It includes simulated login, page source code retrieval,
Method 5: traverse all files and folders in a folder
Traverse all files and folders in a folder
Function list_dir ($ dirpath ){
If ($ dirpath [strlen ($ dirpath)-1]! = "\") {$ Dirpath. = "\\";}
Static $ result_array =
PHP operation files
This class is a file operation class that implements file creation, writing, deletion, modification, copying, moving, creating directories, and deleting directories.
/**
* This class is a file
Method 3: traverse all files and folders in a folder
Traverse all files and folders in a folder
Function list_dir ($ dirpath ){
If ($ dirpath [strlen ($ dirpath)]-1! = '/'){
$ Dirpath. = "/";
}
Static $
Php code for generating thumbnails (good compatibility)
PHP generates a lot of thumbnail code, but it is completely compatible with gd1.6 and gd2.x, and can ensure that there is almost no clear code for thumbnail reduction. the following
Example of multiple queries using phpmysqli
Examples of Mysqli multiple queries in php. For more information, see.Mysqli_multi_query (mysqli link, string query) is a process-based msyqli_more_results (mysqli link) that determines whether
Apsaravideo for apsaravideo VOD
Implementation idea of this code: provides an interface, as long as the data format meets the XML format of the interface it gives, it can be sent to the music corresponding to the publisher1. construct the
Php: Getting started with sqlite
For example, php reads sqlite data.
// Open the sqlite database
// $ Db = @ sqlite_open ("MM. sqlite", 0666, $ error); // not supported
// $ Db = new PDO ('sqlite: MM.
Php prevents SQL injection and instance code
Prevention of SQL injection by php is a very important security measure.An excellent php programmer must be able to write code smoothly and keep the program in a secure environment. Today, we
Php prevents SQL injection function usage
Use the addslashes function in php to prevent SQL injection.Although many php programmers in China are still relying on addslashes to prevent SQL injection, we recommend that you enhance Chinese
PHP ~ Performance Comparison with various acceleration tools ~
Xcache overview I have already introduced the principles and functions of the PHP accelerator (see PHP-FPM server in LAMP architecture). as one of the widely used PHP
How does php determine whether it is an index array?
For example, check whether the php array is an index array.
Function is_assoc ($ arr ){
Return array_keys ($ arr )! = Range (0, count ($ arr)-1 );
//
PHP truncation function mb_substr ()
In php, the mb_substr () function is a function used to intercept Chinese and English characters.The mb_substr () function is not supported by default in php. we need to find php in the windows directory.
PHP thread library: pthreads
This project provides a POSIX-based multi-thread programming mechanism for PHP. You can asynchronously execute any user-defined methods and functions. Built-in support for synchronization and synchronization
: Phpdownloadphp implements code jump to download file responseredirect: Jump to core code implementation. The copy code is as follows: if (isset ($ link) {Header (HTTP1.1303SeeOther); Header (Location: $ link); exit;} jump to the core code
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