php 发送 Email
< ?php
require("mail/class.phpmailer.php");//调用
$mail = new PHPMailer();//实例化phpmailer
$address = "mailxi@126.com";//接收邮件的邮箱
$mail->IsSMTP(); // 设置发送邮件的协议:SMTP
$mail->Host = "smtp.163.com"; // 发送邮件的服务器
$mail->SMTPAuth = true; // 打开SMTP
$mail->Username = "我的账户"; // SMTP账户
$mail->Password = "我的密码"; // SMTP密码
$mail->from = "mailxi@163.com";
$mail->fromName = "peng";
$mail->AddAddress("$address", "");
//$mail->AddAddress(""); // name is optional
//$mail->AddReplyTo("", "");
//$mail->WordWrap = 50; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
//$mail->IsHTML(true); // set email format to HTML
$mail->CharSet = "UTF-8";//设置字符集编码
$mail->Subject = "Sinopf的测试邮件";
$mail->Body = "Hello,Sinopf的测试邮件";//邮件内容(可以是HTML邮件)
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. < p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo&nb
相关文档:
Php Variable Circular References
Circular-references has been a long outstanding issue with PHP. They are
caused by the fact that PHP uses a reference counted memory allocation
mechanism for its internal variables. This causes problems for longer
running scripts (such as an Applicatio ......
just get a json
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<mce:script src="jquery-1.3.2.min.js" mce_src="jq ......
首先,建InnoDB类型的表,才能支持事务
$handler = mysql_connect('localhost', '', '');
mysql_select_db('test');
mysql_query('SET AUTOCOMMIT=0'); // 设置为不自动提交查询
mysql_query('START TRANSACTION'); // 开始查询,这里也可以使用BEGIN
mysql_query("INSERT INTO users VALUES ('ccc')");
mysql_query( ......
转载请注明出处: http://www.zvv.cn/blog/show-101-1.html
前些天发现通过Notepad++的DBGP插件结合PHP的xdebug扩展可以实现PHP文件调试,同时,介绍说包含了单步调试、监视变量还有跨 文件调试。按照网络上的资料配置好调试环境后实际试用了发现功能较为简陋,单文件调试还可,如果是跨文件调试项目就不那么舒服了, ......