Copy CodeThe code is as follows:
/*
*@ Adding data functions automatically
*@ $table Table Name
*@ $arr Word Snippets Array ("title", Array ("content", int))
*@ Array (field, type)
*@ type description
html--Allow HTML
unhtml-HTML is not allowed
int--
Copy CodeThe code is as follows:
/*template.class.php
@ Kang Shengweibo Template Extraction class think this template useful to spend some time independent out. by Rezhigin
@ have a look at CTT this template is similar to Phpcms's template?? ^_^
The framework is mainly used to realize the collaborative development between multiple programmers and the implementation of MVC development pattern. SKYMVC The MVC development approach, the framework itself is easy to expand. SKYMVC as the basic
1. When all instances are set to null,php, the object's references are automatically cleared.
2. Construction Sub: __construct ()
Methods to be executed automatically when objects are purged: __destruct ()
You can also set methods for manually
1. Preg_replace ()
$msg = Preg_replace ("/
And the middle part
$msg = Preg_replace ("/]+>/", "", $msg); -----is to delete <> and intermediate content
I (pcre_caseless)
If this modifier is set, the characters in the pattern will match the uppercase
Copy CodeThe code is as follows:
/**
* Factory Method mode
*
* Define an interface for creating objects, let subclasses decide which class to instantiate, defer to its subclasses with instantiation of a class
*/
/*
Class Dbfactory
{
public static
Requirements: In the system in the new file is can be implemented automatically numbering. For example, the default file name for a new text file is: New text document. txt, if the file name changes automatically when you continue to create new text
Suddenly think of the previous contact Flash will picture binary stream to PHP, brainwave with $globals[' http_raw_post_data '] get to.
So in-depth check, the original PHP default only recognizes the application/x-www.form-urlencoded standard data
So you can judge the end of a request based on EOF, the following code (PHP) is common:
Copy CodeThe code is as follows:
$FP is a handle produced by Fsockopen ()
while (!feof ($fp)) {
Echo fgets ($FP);
}
(Note: The short connection mode is marked
Copy CodeThe code is as follows:
/**
* @author Yuans
* @copyright php.com
* @package function of the common use of methods and characteristics.
*/
# base function writing note points.
To facilitate the management of the IDE and the code hinting
Wrote a test for MySQL PHP file as follows:
Copy CodeThe code is as follows:
$link =mysql_connect (' localhost ', ' root ', ' root ');
if (! $link) echo "Failed!";
else echo "Success!";
Mysql_close ();
?>
Results reported error: Fatal error:call
Although it is known that this parameter means "People's Republic of China", but the official document does not have such parameters, only Asia/shanghai, Asia/hong_kong and so on these parameters ah, why here can be set to RPC, which is the point of
Here we obtain data from the data interface of WAN or new network, and then output it through the simple text processing of PHP.
Copy CodeThe code is as follows:
$domain = $_get[' Q '];
Preg_match ("|
(.+?)
|is ", @file_get_contents (' http://
For example, there are two memcached modules in Pecl, Memcache and memcached, most of the current PHP environment is using the Memcache version without d in the name, this version released earlier, is a native version, The corresponding memcached
Copy CodeThe code is as follows:
/*
* Author: Hu Rui
* Date: 2011/03/19
* e-mail: hooray0905@foxmail.com
*
* 20110319
* Common database operations, such as: Add or delete changes, get a single record, multiple records, return to the latest one
Check the code first.
Copy CodeThe code is as follows:
function Deldir ($dir) {
Delete the files in the directory first:
$DH =opendir ($dir);
while ($file =readdir ($DH)) {
if ($file! = "." && $file! = "...") {
$fullpath = $dir. " /". $file;
if
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