The code is as follows:
Update log:
2013-01-01 version 1.02014-03-15 increase in image, video, voice content reply2014-04-09 Add menu link EventsThe judgment method of revising text reply in 2014-04-10
Copy Code code as follows:
/*
This article for everyone to share a super easy, versatile PHP page class, the specific implementation code as follows
The first type of PHP page-class
The second section of the PHP page class
The above is for you to share
Because some special character's display effect reason had to change the custom Utf-8 project to the GBK, because uses the AJAX technology, also involves the old problem--the coding transformation. Some form validation needs to return JSON data, PHP'
This example describes the PHP time class. Share to everyone for your reference, specific as follows:
year=date ("Y", $time);//Returns a two-digit year of}else{back $this->year=date ("Y", $time); Returns four-bit year 2013}//returns the
This article describes the Addslashes () and stripslashes () implementation string escape and restore usage in PHP. Share to everyone for your reference, specific as follows:
The addslashes () function in PHP returns a string that adds a backslash
Working with scenes
First look at the following code:
Abstract class Base {
//do sth
}
class AClass extends base{public
static function create () {return
n EW AClass ();
}
Class Bclass extends base{public
static function create (
In PHP to implement the verification code is very convenient, the key point is to master PHP library and the use of session.
Throughout the online PHP generated verification code examples, are all PHP GD Library and session of the combination, and
Function: Compress the file into zip, or rar compressed package. Suffix names can be customized.
How to: Instantiate first, then pass the argument. Two parameters. First an array of your file addresses. The second is the absolute address of the
The example in this article describes how PHP uses Phpexcel to import exported data. Share to everyone for your reference, specific as follows:
Import data:
';
$objReader = Phpexcel_iofactory::createreader ($inputFileType);
$objPHPExcel =
In PHP set up a session there are many aspects of the package to set the value of the session or directly set the expiration, expiration and expiration date, the following small series to give you a friend to introduce how to use.
Let's take a look
Now many of the group buying site has the remaining time display. Displaying the rest of the time can be implemented using JavaScript, but we'll find it unsafe to use JavaScript because JavaScript gets the client's time. For example, this is the end
Example:
!defined (' MAGIC_QUOTES_GPC ') && define (' MAGIC_QUOTES_GPC ', GET_MAGIC_QUOTES_GPC ());
O (︶^︶) o Alas, very dizzy, today asked n many people. I finally got the "&&" thing figured out what's going on.
Operators do not have to judge
have been doing PHP development work. In the process of development has long heard the "pseudo static" this said. But there has been no understanding of it. Today through this article carefully study.
First, what is pseudo static:
Pseudo static
This method works by intercepting a string containing an HTML tag and closing the tag if it is not closed to prevent the open label from breaking the original page layout. After the interception, replace the extra content with the ... or any other
Let's start with a function that's just introduced in WordPress 3.6 recently.
/**
* Add slashes to a string or array of strings.
* This should is used when preparing the data for the
core API that expects slashed data.
* This should is used
PHP Decompression zip file function, the source code is short, need to use zziplib Library extension, before using please confirm that the extension has been opened.
?
/**********************
* @file-path to zip file need to extract the path
*
One, constant
A constant is an identifier (name) of a simple value. As its name implies, the value cannot be changed during script execution (except for the so-called Magic constants, which are not constants). Changshime think case sensitive. By
No more nonsense, straight into the theme.
Recommended Tutorials: How PHP uses the Mpdf class to generate PDFs
1.config.php file, about 67 lines:
2. When in use
Note that +acjk this argument, not the C parameter
$mpdf =new
The plug-in method of the reflection API is based on the functionality of the program that is determined at run time, that is, it allows the creation of optional interface methods and detects this part of the interface method for the first time, and
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