Php implements keyword replacement and highlighted code
/*
Usage: highlight keywords
Requirements: all Symbols except html tags in the document are replaced by .
$ Rows ['content'] =
PHP automatically generates the class of the keyword internal chain
/**
* Php automatically generates the internal link of the keyword
* By bbs.it-home.org
*/
Include_once (dirname (_ file _
Phpgetdate function usage example
$ A = getdate ();
Printf ('% s % d, % d', $ a ['month'], $ a ['mday'], $ a ['Year']);
?>
2. getdate () uses the specified timestamp
$ A =
PHPget_class () function usage example
Class Foo {
Function name_none_static (){
Echo "My name is". get_class ()."";
Echo "My name is". get_class ($ this )."";
}
}
// Class
Php code for merging element values of multiple arrays without duplicates
/**
* The element values of multiple arrays are merged without duplicates.
* By bbs.it-home.org
*/
Function
What should I pay attention to when uploading files in php?
Upload the attachment:
Tip: you can use upload_max_filesize in php. ini to set the maximum value allowed to upload files.In addition, there is
Examples of common PHPExcel methods
/**
* Phpexcel usage example
* By bbs.it-home.org
*################
*/
// Set the include path of the PHPExcel class library
Set_include_path ('
Php regular expression matches strings that start with "abc" and cannot end with "xyz"
This article describes how to use a php regular expression with a regular expression that starts with "abc" and cannot end with "xyz". For more
Getting started with php array: finding the difference set of correlated arrays
This article describes how to find the correlated array difference set in the php array, mainly the usage of the php array function array_diff_assoc. For more
Php sample code used to determine the size of the uploaded file
This article describes how to use php to determine the size of the uploaded file. For more information, see.The code is as follows:
120 | $ arr [2]> 60) {echo ""; exit () ;
Getting started with php arrays: deleting elements from the end of an array
This article introduces how to delete elements from the end of an array through php Array Operations. For more information, see.In the php array function, the array_
Php session expiration settings
This article introduces how to set the session expiration method in php. the introduction is more detailed. For more information, see.Set session expiration in php. the simplest thing is to modify session. gc_
Usage of dirname () and _ FILE _ constants in php
$ Basedir = dirname (_ FILE __);
?>
If B. php is referenced by the. php file require or include in another directory. The content of the variable $
Php code example for user registration
This article describes how to check and store user registration information in php. For more information, see.The code is as follows:
Query ('set names gb2312 '); if (empty ($ conn) {die
Comparison of the efficiency of string functions strtr, str_replace and preg_replace in php
This article introduces three strtr, str_replace, and preg_replace functions used for string processing in php to compare and analyze the efficiency.
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