This article introduces, using PHP code to determine whether the Web page to enable gzip compression method, a friend may wish to make a reference.Collection of Web pages found file_get_contents saved to the local for garbled, the response of the
This section is the Nineth section of the PHP introductory tutorial, which describes the relevant content of PHP predefined arrays, and interested friends can refer to the learning.What's in this section: PHP Pre-defined arraysWhat is a predefined
Class Employee {
Defining constants
Const AVAILABLE = 0;
Const OUT_OF_STOCK = 1;
Public $status;
}
Print employee::available;
?>
Copy CodeExample 2, defining constants in a class
Define an abstract class
Abstract class Staff
{
Abstract function hire ();
Abstract function Fire ();
abstract function promote ();
Abstract function demote ();
}
?>
Copy
Information about the Statistics folder
Number of statistical catalogs
Format output Directory size unit: BYTES,KB,MB,GB
function Getfoldersize ($path)
{
$totalsize = 0;
$totalcount = 0;
$dircount = 0;
/**
* Func:delete_file
* Params: $file file name
* Multiple criteria to determine the deletion of files
* by bbs.it-home.org
*/
function Delete_file ($file)
{
if (file_exists ($file))
{
$delete =
This article introduces, under the PHP environment PHP-FPM configuration method, to the PHP-FPM configuration option and the method makes the detailed introduction, has the need friend reference.Contents of this section: PHP-FPM
This article share, PHP implementation of the detection of a Trojan horse code, can be used to detect the 16-coded Trojan horse program, a friend of the need to refer to the next bar.This PHP test picture Trojan program, from the production
Chinese_money. Php
Changing Arab money num-to-Chinese money num
/*
Functions List:
Chinese_money_max ()
Before the decimal point
This function can be taken separately to convert Arabic numerals to Chinese
Delete all file functions in the specified directory (folder)
function Delfile ($dir) {
if (Is_dir ($dir)) {
$DH =opendir ($dir);//Open Directory
List all files in the directory and remove them. And..
while (false!=
/**
* Traverse files and folders
* edit:bbs.it-home.org
* 2013/10/12
*/
function List_dir ($dirpath) {
Determine if the character at the back of the path is a backslash, and if not, add a
if ($dirpath [strlen
If you have http_x_wap_profile, it must be a mobile device.
if (Isset ($_server[' http_x_wap_profile ')) {
return true;
}
Copy CodeAnalysis: By getting the Http_x_wap_profile information returned by the client, it can
Share a PHP implementation of the image processing class, you can set the text watermark and image watermark, etc., there is a need for friends reference.This section to share a picture processing class, simple implementation of the text watermark
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