Virtual Proxy for delayed loading
This product was learned from Martin's "Enterprise Application Architecture Model", which assists PHP with the dynamic language features and can implement LazyLoad much easier than Java ). The basic
Form verification
/**
* Page function: Common form verification classes
* Prepared by: phper
* Creation Time: 2011-4-11
*/
Class validate {
Public static function
Obtain the physical (MAC) address of the machine Nic
/**
Obtain the physical (MAC) address of the machine Nic
**/
Class GetMacAddr
{
Var $ return_array = array (); //
Checkbox delete multiple
Delete. php
$ Link = mysql_connect ("localhost", "root ","");
Mysql_select_db ("dbname ");
$ Id = $ _ POST ['select']; // call the name of input
PHP: regular expression for processing topics and object names in Weibo
$ Post_content = "@ oschina and @ twitter use # PHP # Regular expression # filter topic and object names in research ";
$ Tag_pattern =
How to export the excel color from phpexcel and the color on the webpage is different
Require_once './PHPExcel. php ';
Require_once './Excel5.php ';
Require_once './get_excel_row.php ';
Require
Example of generating high precision time in php
$ Start = microtime (true );
For ($ I = 0; I I
Preg_match ('/age = \ d +/', $ _ SERVER ['query _ string']);
}
$ End = microtime (true );
?>
PHP calls the HiChina interface to query domain names
Php code:
// Obtain the top-level domain name
$ Ext = $ _ POST ['text'];
// Obtain the second-level domain name
$ Dns =
Example of php Singleton mode
/**
* By bbs.it-home.org
* 2012-12-26
*/
Class Mysql {
// This property is used to save the instance
Private static $ conn;
// The constructor
Notes for the json_decode function in php
Json_decode in php has two parameters: the first is the string to be parsed, and the second is whether to be parsed as an Array.Json_decode in php has two parameters: the first is the string to
Use PHPExcel to export data to Excel in CI
Class Table_export extends CI_Controller {
Function _ construct ()
{
Parent: :__ construct ();
// Here you should add some sort of user validation
Applications related to smarty cache
$ Smarty-> cache-dir = "directory name"; // create a cache directory name
$ Smarty-> caching = true; // enable cache. if it is false, the cache is invalid.
$ Smarty->
Convert PHPJSON to array
$ S = '{"webname": "homehf", "url": "www.homehf.com", "qq": "744348666 "}';
$ Web = json_decode ($ s); // Convert the character to JSON
$ Arr = array ();
Foreach ($ web
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