Php program for mass mailing by reading text
// Request the PHPmailer class file
Require_once ("class. phpmailer. php ");
// Email sending function
Function smtp_mail ($ sendto_email,
Specify the small function of the message through the JS prompt on the page.
/*
* Function: specify a message through the JS prompt on the page and end the page execution.
* Parameters:
* Msg: The
Php watermark code for an enhanced version
/*
* Function: PHP image watermark (watermarks support images or text)
* Parameters:
* $ GroundImage: specifies the background image to be Watermark.
Php string determination and deletion of variables
$ A = '11 ';
$ B = 11;
If ($ a ===$ B)
{
Echo 'Strictly equal ';
}
Else if ($ a = $ B)
{
Echo 'Equality ';
}
Else
Passport encryption function written in php
/**
* Passport encryption function
*
* @ Param string the original string waiting for encryption
* @ Param string private key (used for
Strtotime function efficiency in php
$ Start = array_sum (explode ('', microtime ()));
For ($ I = 0; $ I
Strtotime ("-1 day ");
}
$ End = array_sum (explode ('', microtime ()));
A function used to calculate the runtime of a php page
/*
Calculate the php program running time
*/
Function microtime_float ()
{
List ($ usec, $ sec) = explode ("",
Php magic_quotes_gpc dynamic shutdown invalid solution
If (ini_get ('Magic _ quotes_gpc ')){
Function stripslashesRecursive (array $ array)
{
Foreach ($ array as $ k => $ v ){
If
Several minor mistakes that php beginners can easily make
This article lists several minor mistakes that php beginners may make for your reference. 1. the header already sent error usually occurs when you use the HEADER. it may be caused by
Example of calculating the execution time of the current page in php
// Do something
Sleep (3 );
// Do something
$ Running_time = time ()-$ _ SERVER ['request _ time'];
Echo 'Page
Configure to run php in FastCGI mode in Gentoo
Echo "dev-lang/php fpm">/etc/portage/package. use
Emerge-av dev-lang/php
Configuration is very simple, my local version is php5.4, then edit the file/etc/php/fpm-php5.
A php file and folder operation class written by myself (create, delete, move, copy)
/**
* File operations
*
* Example:
* FileUtil: createDir ('a/1/2/3'); create a folder named a/1/2/3
An example of socket programming in php
Error_reporting (E_ALL );
Set_time_limit (0 );
Echo "TCP/IP Connection \ n ";
$ Port = 1935;
$ Ip = "127.0.0.1 ";
/*
+ --------------
Php command line running parameters and applications
Php can be executed on the web page, and the PHP script can be executed in the command line through the php cli (command line interface.Php can be executed on the web page, and the PHP
Learning the closure of PHP5.3: function () use (& amp; $ param)
Function closureCreater (){
$ X = 1;
Return function ($ fun = null) use (& $ x) {// pass the value by reference
Echo"". $ X ++;
Use examples to learn comparison and logical operations of php
Class Test {
Private $ k = 1;
Public function _ get ($ propertyName ){
Return 123;
}
}
$ Obj = new Test ();
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