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

php自动发送邮件

首先来个 email.class.php 类:
   <?php
class smtp
{
/* Public Variables */
var $smtp_port;
var $time_out;
var $host_name;
var $log_file;
var $relay_host;
var $debug;
var $auth;
var $user;
var $pass;
/* Private Variables */
var $sock;
/* Constractor */
function smtp($relay_host = "", $smtp_port = 25,$auth = false,$user,$pass)
{
$this->debug = FALSE;
$this->smtp_port = $smtp_port;
$this->relay_host = $relay_host;
$this->time_out = 30; //is used in fsockopen()
#
$this->auth = $auth;//auth
$this->user = $user;
$this->pass = $pass;
#
$this->host_name = "localhost"; //is used in HELO command
$this->log_file ="";
$this->sock = FALSE;
}
/* Main Function */
function sendmail($to, $from, $subject = "", $body = "", $mailtype, $cc = "", $bcc = "", $additional_headers = "")
{
$header="";
$mail_from = $this->get_address($this->strip_comment($from));
$body = ereg_replace("(^|(\r\n))(\\.)", "\\1.\\3", $body);
$header .= "MIME-Version:1.0\r\n";
if($mailtype=="HTML"){
$header .= "Content-Type:text/html\r\n";
}
$header .= "To: ".$to."\r\n";
if ($cc != "") {
$header .= "Cc: ".$cc."\r\n";
}
$header .= "from: $from<".$from.">\r\n";
$header .= "Subject: ".$subject."\r\n";
$header .= $additional_headers;
$header .= "Date: ".date("r")."\r\n";
$header .= "X-Mailer:By Redhat (PHP/".phpversion().")\r\n";
list($msec, $sec) = explode(" ", microtime());
$header .= "Message-ID: <".date("YmdHis", $sec).".".($msec*1000000).".".$mail_from.">\r\n";
$TO = explode(",", $this->strip_comment($to));
if ($cc != "") {
$TO = array_merge($TO, explode(",", $this->strip_comment($cc)));
}
if ($bcc != "") {
$TO = array_merge($TO, explode(",", $this->strip_comment($bcc)));
}
$sent = TRUE;
foreach ($TO as $rcpt_to) {
$rcpt_to = $this->get_address($rcpt_to);
if (!$this->smtp_sockopen($rcpt_to)) {
$this->log_write("Error: Cannot send email to ".$rcpt_to."\n");
$sent = FALSE;


相关文档:

ubuntu 下 搭建 apache+php+mysql


#apt-get install apache2
//安装apahce2
#apt-get install php5
//安装php5
#apt-get install mysql-server
//安装mysql服务端
#apt-get install  mysql-myclient
//安装mysql的客户端
#apt-get install php-mysql
//安装php-mysql的连结
apache+php+mysql 环境已经搭建好了
将以下的服务重启一下
#/et ......

PHP图像图形处理技术


<?php
     header("content-type:image/png");  //定义输出的图像类型;
     $image=imagecreate(300,155);        //新建图像;
     $bg=imagecolorallocate($image,220,40,120);   &nbs ......

新一代 PHP 框架 QeePHP 发布

http://blog.csdn.net/fleaphp/archive/2009/02/26/3940430.aspx
QeePHP 的架构模式
QeePHP 是一个与众不同的框架。
QeePHP 遵循“内核最小化,功能插件化”的原则,利用内核实现了一个快速、可扩展的架构。然后在核心之外,通过各种插件提供不同类型的基础服务。
 
QeePHP 的架构概貌
这种架构模式的 ......

php显示时间代码

一、PHP函数Date()获取当前时间
代码:
<?php echo $showtime=date("Y-m-d H:i:s");?>
显示的格式: 年-月-日 小时:分钟:秒
相关参数:
a:"am"或者"pm"
A:"AM"或者"PM"
d:几日,二位数字,若不足二位则前面补零,如: "01"至"31"
D:星期几,三个英文字母,如: "Fri"
F:月份,英文全名,如: "Jan ......

国外十大最流行PHP框架

以下为十个目前最流行的基于MVC设计模式的PHP框架。
1. Yii
Yii是一个基于组件的高性能的PHP的框架,用于开发大规模Web应用。Yii采用严格的OOP编写,并有着完善的库引用以及全面的教程。从MVC,DAO/ActiveRecord,widgets,caching,等级式RBAC,Web服务,到主体化,I18N和L10N,Yii提供了今日Web 2.0应用开发所需要的几 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号