How to use string functions in PHP. How to use the character string function in PHP has many character string operations. The following are important: (1) the first two functions of echo, print, printf, and sprintf are output strings. how to use the
Adjust the PHP file size limit
Max_execution_time = 30; Maximum execution time of each script, in seconds
Max_input_time = 60; Maximum amount of time each script may spend parsing request data
;
PHP functions implement paging effect, php text paging and numeric paging
// Pagination
/**
* $ PageType paging Type 1: numeric paging 2: text paging
* You can pass $ pageTotal, $ page, $ total, and other
Which of the following functions escape special characters in phpmysql?
This article describes the functions commonly used to escape special characters in php mysql programming, including the usage of mysql_escape_string and addslashes
Php date addition and subtraction processing function example
Echo "today:", date ('Y-m-d H: I: s '),"";
Echo "tomorrow:", date ('Y-m-d H: I: S', strtotime ('+ 1 DAY '));
?>
Current time output from
Php split array example
$ Arr = explode ("|", $ array ['A']);
// Split the array
$ Num = @ count ($ arr );
// Obtain the number of arrays
For ($ I = 0; $ I
Echo $ arr [$
Example of modifying the php. ini configuration file
@ Ini_set ('memory _ limit ', '64m');/* Maximum memory size occupied by the script */
@ Ini_set ('max _ execution_time ', '15');/* maximum script execution time */
CentOS6.2 use yum to install LAMP and phpMyadmin
# If The system prompts The requested URL returned error: 404, replace it with The latest version.
Rpm-ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5
Php imports csv files to SQL files and inserts them into the database automatically (example)
/**
* Import a csv file using the php header
* Edit: bbs.it-home.org
*/
Header ('content-type:
An example of a php user-defined function for calculating the remaining time
/**
* Calculate the remaining time
* By bbs.it-home.org
*/
Public function gettime ($ time_s, $ time_n ){
$
Php array sorting method (script School Dedication)
This article introduces the commonly used array sorting methods in php, including the usage of php array sorting functions, and the sorting methods of one-dimension arrays, two-dimensional
Php Chinese character to pinyin implementation code
/***
* Pinyin. php
* Example: Pinyin ('Zhang Honghua ', 1); // if the second parameter is set as needed, UTF-8 encoding is null. the default value is gb
Example of php regular expression verification Email address
This article introduces the example of using regular expressions in php to verify the Email address. For more information, see.Php implements an example of verifying the email
Two methods for php to obtain the file extension
This article describes a piece of php code used to obtain the file extension. it is convenient to use pathinfo () to obtain the extension in php. For more information, see.In php, you can
Example of an algorithm for generating globally unique guid using php
This article describes how to use php to generate a guid with a globally unique identifier. For more information, see.1. create the php class library file-guid. php
PHP replaces the function of the internal link of the article with the php keyword (including the function of blocking and restoring the original link)
/*
* Replacing the article chain with PHP
* By
Php implementation code to prevent ddos, dns, and cluster attacks
/**
* Prevents ddos, dns, cluster, and other attacks
* Edit bbs.it-home.org
*/
// Query the forbidden IP address
$ Ip = $ _
Php implements rc4 encryption algorithm
The decryption method of this algorithm can be restored by re-encryption once ..
/*
* Rc4 encryption algorithm
* $ Pwd key
* $ Data the data to be encrypted
*/
Check whether the date is valid
Check whether the date is valid
Function check_date ($ date) {// check whether the date is valid
$ DateArr = explode ("-", $ date );
If (is_numeric ($ dateArr [0]) & is_numeric ($
Usage of unlink (), mkdir (), and rmdir () in php
Unlink () function use instance
// Use the unlink function to delete an object
$ Filename = "data.txt"; // defines the variable
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