易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP 发送邮件

 
PHP 发送邮件
作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-28 修改:2007-06-17 浏览:14208 ::  :: 
 PHP Sessions
PHP allows you to send e-mails directly from a script.
PHP允许你通过脚本直接发送e-mail。
The PHP mail() Function
PHP mail()函数
The PHP mail() function is used to send emails from inside a script.
PHP mail()函数可以从脚本内发送email。
Syntax
语法
mail(to,subject,message,headers,parameters)
Parameter
参数Description
描述
to
Required. Specifies the receiver / receivers of the email
必要参数。指定email的接收者
subject
Required. Specifies the subject of the email. Note: This parameter cannot contain any newline characters
必要参数。指出email的主题。注意:这个参数包含的字符不能换行(只能显示一行)
message
Required. Defines the message to be sent. Each line should be separated with a LF (n). Lines should not exceed 70 characters
必要参数。定义发送的信息。每行都必须用(n)分隔开。每行不能超过70个字符
headers
Optional. Specifies additional headers, like from, Cc, and Bcc. The additional headers should be separated with a CRLF (rn)
可选参数。指定附加标题,如:form、Cc及Bcc。附加标题通过(rn)进行分隔
parameters
Optional. Specifies an additional parameter to the sendmail program
可选参数。给sendmail程序指定一个附加参数
Note: For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file. Read more in our PHP Mail reference.
注意:PHP需要安装、运行email系统才可以使用mail函数。所使用的程序是通过php.ini文件中的配置属性来确定的。阅读更多的关于PHP Mail参数。
PHP Simple E-Mail
简易的E-mail
The simplest way to send an email with PHP is to send a text email.
使用PHP发送邮件的最简单的方法就是发送一个文本格式的email。
In the example below we first declare the variables ($to, $subject, $message, $from, $headers), then we use the variables in the mail() function to sen


相关文档:

java,php,mysql时间处理

java中时间戳和时间字符串之间的转换
获取当前的unix时间戳
new Date().getTime()
System.currentTimeMillis()
返回的是毫秒数,要转换long t = System.currentTimeMillis()/1000;
获取当前年月日以及时分秒
Calendar c = Calendar.getInstance();
c.get(Calendar.YEAR))  c.get(Calendar.YEAR))  c.get(C ......

一次Nginx+PHP+Mysql的并发测试经历

 一次Nginx+PHP+Mysql的并发测试经历
  一、硬件环境
      CPU:4核Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz
      6G内存,120G硬盘
  二、软件环境
     L ......

php array_diff()

 array array_diff
( array array1, array array2 [, array
...] )
array_diff()
返回一个数组,该数组包括了所有在 array1
中但是不在任何其它参数数组中的值。注意键名保留不变。
猛的一看这个方法,还以为是将两个数组中不同的返回来呢,事实上不是,返回的是在array1中的,但是不在其他数组中的。 ......

为PHP添加mcrypt扩展模块

基本原理是:首先使mcrypt软件能够运行,然后安装php扩展模块,并在php.ini配置。
这里注意的是mcrypt软件依赖libmcrypt和mhash两个库,所以安装配置顺序从右至左
一,下载安装mcrypt
1.先去http://www.sourceforge.net下载Libmcrypt,mhash,mcrypt安装包 ,下面是我找到的链接
   Libmcrypt(libmcrypt-2.5.8.t ......

PHP抓取新浪读书频道的小说,生成电子书

//想看什么电子书,先去新浪读书搜索,然后填入对应的参数即可
//http://vip.book.sina.com.cn/
//电子书参数
$array_book[0] = 38884;     //小说id
$array_book[1] = 22172;    //章节起始id
$array_book[2] = 32533;   //章节结束id
$array_book[3] = '中国特种部队 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号