Php implements two-way cyclic queue-(implements functions such as forward and backward history records)
To enable the record operation history function
This function is similar to the undo or undo function. (Implement forward
KindEditor initialization parameters
FileManagerJson
Specifies the server program for browsing remote images. Data Type: String; default value: basePath + 'php/file_manager_json.php'
AllowPreviewEmoticons
Function that automatically detects the encoding in the content and performs conversion
// --- Example
$ Url = http://www.163.com ";
$ Data = file_get_contents ($ url );
$ Data = my_encoding ($
The function of PHP to obtain the length of a string under UTF-8 and GBK encoding
/*
* String length statistics
* @ Param $ str statistical string
*/
Function sstrlen ($ str ){
Global $
Application and introduction of php's curl_setopt function
// Address of the Forum api logon interface
$ Uri = "http // www.wap.com/ssdfasdfsf"
// Parameter array
$ Data = array (
'Username' => 'username
A small function that determines whether a string contains Chinese characters.
/*
It can be used for user names and other places where Chinese characters are not allowed
*/
// --
A function that determines whether it is a string within the specified length.
//
// Function name: CheckLengthBetween ($ C_char, $ I _len1, $ I _len2 = 100)
// For usage: determines whether the
Function for intercepting Chinese characters-csubstr
//----------------------------------------------------
// Function name: csubstr
// Used as a string. one Chinese character is counted as two
Demo code of php Singleton mode
Class User {
Static function getInstance ()
{
If (self: $ instance = NULL) {// If instance is not created yet, will create it.
Self: $ instance = new User ();
A question about Loop quits in php
// The Current php loop is 1, and the loop increases sequentially from the inside to the outside. the default break is 1, for example, jumping out of the 2nd-layer
Introduction and examples of php Singleton mode
Private static $ _ instance;
2) constructor and clone functions must be declared as private to prevent external programs from losing the meaning of Singleton mode due to
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