Learn about PHP mvc development through examples
Require 'command/config. php ';
Require 'command/app. php ';
App: run ($ config );
?>
Load the system configuration file, and then load the
Check and clear the bom function in the PHP file
/**
Function: detects and clears the BOM.
Link: bbs.it-home.org
*/
If (isset ($ _ GET ['dir']) {
$ Basedir = $ _ GET ['dir'];
}
Which factors determine the access speed of the server?
Server hardware configuration (including server type, CPU, hard disk speed, memory size, and Nic speed)Network environment and speed of the serverThe rate at which the network
Php tips for caching static variables
Function updateFirstEndFromBatchtasks (...){
Static $ cache = array ();
$ Val = $ cache [$ key];
If (is_null ($ val )){
$ Val =... // get the value of $
Php connection to mysql timeout solution
Function reconnect (){
If (! Mysql_ping ($ this-> db )){
// Here is the major trick, you have to close the connection (even though its not currently working) for
Example of php string segmentation function explode
$ This_year = 2013;
$ Text =
Zhu Wushuang, F, 1982, Guangdong, General Staff
Li Sanbing, M, 1981, Hebei, General Staff
Zhao Pixiu, F, 198
Php-redis Chinese Document 5
This article is the fifth part of the php-redis Chinese document. For more information, see.This article is the fifth part of the php-redis Chinese document. For more information, see.Hash operation hSet $ redis-
Php-redis document 2
This article is the second part of the php-redis Chinese document. Next, I will continue to introduce some of the commands officially provided by apsaradb for redis. For more information, see.This article is the second
Improved Chinese digital conversion
Recently, I have encountered the problem of converting numbers to Chinese. I wrote this article for a moment. For more information.
/*
* Func digital conversion Chinese class
* Author
Pdo transactions
Pdo transactions
// Simple example of mysql transaction processing implemented by pdo
/*
Transactions that write multiple data entries to the database
Insert into test values ('test123',
Php paging class, first made
For the first time, let's step on
@ Charset "UTF-8 ";
* {Padding: 0; margin: 0 ;}
. Page {
Font-size: 14px;
Text-align: center
}
. Page ul {list-style-type: none; display:
PHP culture programming (ideas)
In fact, it is really fun to pack all the functions in Chinese.Http://blog.qita.in
/**
* Http://blog.qita.in
* @ Copyright 2012
*/
Function output ($ string ){
Obtain the month date by week
Obtain the month date by week
/**
* Obtain the month date by week
* @ Param int $ weenNum week 0-6
* @ Return array $ days returns the date array.
*/
Public
Collect email php code
Because of the mass mailing program, of course there is no mailbox, so I wrote a collection mailbox program.Reproduced from: http://www.tongqiong.com/read.php? Tid-35-ds-1.html
// Author:
Automatically recognize the Text Encoding and convert it to the target encoding!
When PHP processes the page, we use iconv or mb_convert functions for character set Conversion. However, this is actually a prerequisite. That is, we must know
PHP large log file read/write
The log file is large, with two or more GB log files. File operations are not supported. you can only read data by row.
Set_time_limit (0 );
@ Ini_set ('memory _ limit ', '64m ');
Copy folders (win & amp; linux)
Copy the folder to another place./**
/**
* Copy a folder
Eg: copy wordpress under D:/wwwroot/
D:/wwwroot/www/explorer/0000/del/1/
You do not need to add a slash at the end. 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