traverse all files and folders under a folder
function List_dir ($dirpath) {
if ($dirpath [strlen ($dirpath) -1]!= "\ \") {$dirpath. = "\ \";}
static $result _array=array ();
if (Is_dir ($dirpath)) {
Detailed Example Address: http://www.alleyloft.com/contents/share?id=3
/***********************************************
* @ Class Name: page
* @ parameter: $myde _total-Total number of records
* $myde _size-Number
Public Function fooaction ()
{
Forward to another action on the current controller and module:
$this->_forward (' bar ', NULL, NULL, array (' baz ' = ' bogus '));
}
Public Function baraction ()
{
A simple example of writing elfinder, extracting key member methodsThe implementation features are:Implement multi-file copy or move operations Note: In order to facilitate the test, some judgments have been made simple treatment. And in the
This hint is always present during the PHP project, initially using $act to accept the form POST data: $act =$_post[' act ';This hint is always present during the PHP project, initially using $act to accept the form POST data: $act =$_post[' act
I am using the PHP date crawl
echo j7_getdate (' y-m-d ', ' 2010-11-15 ', ' +10 Day ');
function J7_getdate ($format, $time = ' Now ', $opt) {
Return date ("$format", Strtotime ("$time $opt"));
}
When modifying a program, it is suggested that notice:use of undefined constant is resolved by the following method, preferably error_reporting (0), without changing the configuration. When modifying a program, it is suggested that notice:use of
Require ' net/smtp.php ';
$host = ' 126.com '; IP or domain name of the//SMTP server
$username = ' arcow ';//user name of the login SMTP server
$password = ' secret ';//Login to SMTP server password
$from = ' jbxue@126.com '; Who
The Chinese and English mix counts, intercepts, does not use the custom function, but uses PHP's MB extension, uses the original ecology PHP function to handle the string interception easily.First, the following functions are used to intercept
Full PHP class, usually I will cooperate with smary use, quick use (plugins/function.rdate.php)
/*
* Data time functions.
* Module
*/
Defined (' Tsky ') | | Die (' Permission denied! ');
function
This is to use open source project Phpmailer to achieve the mail, first download the file, I download it here is 5.1 version, and then put three class.***.php files into the project file, I first use is Gmail, but failed, the problem is
See someone sharing a code like this. Share a piece of code that supports any large number and is fairly simple.
function Formatfilesize ($fileSize)
{
$unit = Array (' Bytes ', ' KB ', ' MB ', ' GB ', ' TB ', ' PB ', '
Start at the top of the page since we start a session
Session_name (' Mysite_hit_counter ');
Session_Start ();
//
$FN = ' hits_counter.txt ';
$hits = 0;
Read current Hits
if ($hits = file_get_contents ($FN))
This article introduces the difference between empty and isset functions in PHP, and interested friends can refer to the learning. When using PHP to write a page program, I often use the variable handler function to determine the PHP page trailing
The Mb_strlen and strlen functions of PHP make it easy to know the composition of a string Are all English, Chinese and English mixed, or pure Chinese characters. A brief description is given below (the sample program above) 1. If strlen returns the
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