Phpmailer的用法
关于phpmailer的下载请去http://phpmailer.codeworxtech.com/
最简单的说,phpmailer就是用来发送邮件的一个php类。
调用的话其实下载的包里有example文件包,里边是完整的例子。
恩,下边是一个smtp:
< ?php
require("class.phpmailer.php");
//写个自定义函数
function smtp_mail ( $sendto_email, $subject, $body, $extra_hdrs, $user_name) {
$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = "smtp.163.com"; // SMTP servers 以163邮箱为例
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "163的邮箱用户名"; // SMTP username 注意:普通邮件认证不需要加 @域名
$mail->Password = "163邮箱密码"; // SMTP password
$mail->From = "youremail"; // 发件人邮箱
$mail->FromName = "Street13管理员"; // 发件人
$mail->CharSet = "utf8"; // 这里指定字符集!指定为GB2312会乱码!
$mail->Encoding = "base64";
$mail->AddAddress($sendto_email,"username"); // 收件人邮箱和姓名
$mail->AddReplyTo("youremail","youremail");
$mail->IsHTML(true); // send as HTML
// 邮件主题
$mail->Subject = $subject;
// 邮件内容
$mail->Body = '
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta></head>
<body>
欢迎来到yourdomain
</body>
</html>
';
$mail->AltBody ="text/html";
if(!$mail->Send())
{
echo "邮件发送有误
";
echo "邮件错误信息: " . $mail->ErrorInfo;
exit;
}
else {
echo "$user_name 邮件发送成功!";
}
}
// 参数说明(发送到, 邮件主题, 邮件内容, 附加信息, 用户名)
smtp_mail('youremail', '欢迎来到yourdomain!', 'NULL', 'yourdomain', 'username');
?>
gmail跟pop3的用法基本相同,对照着改就可以了。
关于OOo+开源
由于以下原因,放弃使用MS的office套件:
1。安装文件太大。
2。前段时间搞的沸沸扬扬的黑屏事件,虽然我的没有黑屏;
3。因为是MS的东西……
下载了个OOo,全称是OpenOffice.org而不是OpenOffice哦,
下载地址http://openoffice.org,恩,下载的地方可以选择中文版下载。
具体如何使用就不讲了,跟熟悉的MS差不多,兼容的版本也比较全,反正可以直接打开07版word的docx就是了~
介绍下OOo,OOo是SUN的旗下公司,遵循LGPL(GNU Lesser General Public License)和SISSL(Sun Industry Standards Source License)两种版权,
所以,咱可以免费下载使用OOo的源代码,并且可以在经过修改之后出售,而不必公开源代码。
成功的例子是IBM的SuperOffice Suite,SUN自己的StarSuite,还有咱中科院的RedOffice~
不知道为什么,开始喜欢开源的东西,周末看看ubuntu的拨号到底是咋回事,搞定的话也许就可以抛弃VISTA这个烂系统了!
Drupal-用户名格式自定义模组custom_username_validation
Drupal默认的用户名对格式的限制很少,只要通过一下要求即可:
“不可以使用除了英文句号(.)、英文波折号(-)与下划线(_)之外的标点符号。”
所以,长度为1的用户名也可以存在……
早上在Drupalchina跟Drupaltaiwan看了下,都是要通过自己去定义访问规则来解决这个问题,
最可怕的是没有得到任何实质性的解决办法。
由于不熟悉,只好在Drupal.org的modules里慢慢找,结果找到了这个。
custom_username_validation模组
允许定义用户名的php正则表达式和出错信息。
看该模组的介绍,制作者是个好人哪,~以下是该模组的介绍:
“For a customer, i needed to validate the username against a german phone number, so i wrote this little module that allows to define a validation pattern for the username on registration. it's also possible to customize the error message on validation failure.”
PHPBB-分区和版面不显示的问题
装了个PHPBB3,在后台设置好分区后发现前台只显示了2个分区。
讶异的Google了下,似乎很少有人碰到这个问题……好奇怪...
于是怀疑是皮肤文件的限制,但是换了个皮肤还是这样子。
只好继续找,还真给找到了,原来是权限设置的问题!
PHPBB里边所有的分区跟板块都必须设置权限后才会在前台显示,
只设置分区权限或者只设置版面权限都是不行的,一定要都设置。
不知道怎么设置的话可以复制系统默认的那个分区。
SIP阿里软件集成服务平台
原来阿里巴巴在9月份的时候也宣布开放了平台,不知道当时我在做什么,没有注意这个消息……
阿里巴巴这么做,最直观的想法应该就是让更多网店可以有自己的域名,
而里边的布局跟样式都可以由网店自己制作,而数据跟图片只要调用他们提供的API即可。
目前只是简单的看了下SIP白皮书,不知道商品的发布是不是也提供了API,
看起来是个很有战略意义的一步,很好,很喜欢
第三届D2前端技术论坛(上海)
时间:2008年11月29日(星期六) 地点:上海市徐家汇美罗大厦
上午:嘉宾演讲 9:30 – 12:00 时间 主题 嘉宾
09:30 - 10:40 《Flash Player 10》 马鉴(Adobe)
10:50 - 12:00 《Flash 协作开发之路》 史珉(Tudou)
下午:自由论坛 13:30 – 18:00 时间 主题 嘉宾
13:30 - 14:40 《IE8 as future platform》 待定(Microsoft)
14:50 - 15:50 《前端敏捷开发-质量与效率的战争》 许湛(Alibaba)
16:00 - 17:00 《土豆网与淘宝网的前端团队组织结构剖析》 李戎(Tudou) & 怿飞(Taobao)
17:00 - 18:00 自主议题讨论
-----------------------------------------------------------------------
希望到时候可以去上海~想去看看。
强大的Flash 3D非开源引擎
首先是号称日本Flash界No2的roxik,著名的512小球:
然后是日本motion portrait公司的flash实时三维脸部动画(商业):
似乎Swf加过域名限制,有兴趣的直接点链接去官方看吧~http://motionportrait.com/about/TIminoriHair.swf
MAX展上极其强悍的动物园Demo:http://ecodazoo.com/
3D引擎,看起来很夯很暴力,得学习学习。
Flash-DFdou 7位不重复的6+1
早上在吃早饭的路上想的,,就做了下。,以后可以按照这个买6+1了
灭哈哈哈哈哈
代码部分:
//导入tweenlite类
import gs.TweenLite;
import gs.easing.*;
//这里我用的数字是(2, 3, 4, 6, 7, 8, 9),是某MM的号码@。@
var ary_num:Array = new Array(2, 3, 4, 6, 7, 8, 9);
go_btn.onRelease = function()
{
getran(ary_num);
trace(ary_num);
for (var i:Number = 0; i<7; i++)
{
//_root["n"+i]._y = -(ary_num[i]-1)*50-5=-ary_num[i]*50+45;
//_root["n"+i]是0~9竖直排列的mc
TweenLite.to(_root["n"+i], 0.3, {_y:-ary_num[i]*50+45,ease:Back.easeInOut});
}
};
//通过sort来随机排列原数组,这里是不重复排列,也就是说7个数字不重复…
//当然了,实际上6+1是经常出现重复数字的,只不过我不喜欢买重复的数字而已……
function getran(ary)
{
ary.sort(random_me);
return (ary);
}
function random_me()
{
if (Math.random()>0.5)
{
return 1;
}
else
{
return 0;
}
}
Flash-案例展示Demo
Flash地址:点击这里
在上次的横向滚动条里加入了年份的功能,主要是该死的年份还要跟下边的图片年份联动……
上次的相册程序也是根据原普通横向滚动的Demo原型做的,只不过相册增加了菜单,是根据不同菜单载入不同的XML节点来实现的筛选,
而这个鸟东西是根据图片所在的区域来判断年份,或者点击年份根据数组中对应的年份的位置来判断该移动到哪里……
说起相册,上次做完程序后就没传图片上去…I‘m so sorry……
新买的空间域名已经绑定上去了,得花点时间弄下皮肤~
Drupal wins 2008 Best PHP Open Source CMS from Packt Publishing
帖子来源:http://drupal.org/2008-best-php-open-source-cms-award-packtpub
For the third year in a row, Drupal has been nominated for a Packt Publishing Open Source CMS award. Packt Publishing is announcing winners all week. Today they announced the 2008 best PHP open source CMS.
The Award for the best Open Source Content Management System written on a PHP/MySQL platform is today announced as Drupal. Receiving $2,000 as the judges’ and publics favourite, Drupal finishes ahead of Joomla! and CMS Made Simple, who finished on equal points as joint runners up and collect $500 each.
Drupal won this award in both the popular vote and the judges selection. The judges cited improvements to installation, updates, breadth of features in modules, and how Drupal handles errors in these processes. Of special note was Drupal's use of social features and how those features integrate with web content management. Of course the final advantage Drupal had was the "large and hugely supportive community". This award belongs to everyone in the Drupal community for helping each other and particularly new users.
Earlier this week Earl Miles, a.k.a merlinofchaos, was recognized as one of the 2008 Open Source CMS Most Valued People for his work on the Drupal project. On Friday, Packt Publishing will announce the overall open source CMS award winner. The Drupal community has a lot of strong competition and we will be working hard to repeat our win of the 2007 best overall open source CMS award.
------------------------------------------------------------------------------------
看到个新面孔,CMS Made Simple,似乎是后起之秀?
说来奖金只有$2000,好少……
呵呵,恭喜Drupal连续两年获得这个荣誉,恭喜恭喜~
WordPress 2.7 beta1 中文版发布
WordPress 开发团队刚刚发布了 WordPress 2.7 系列的第一个测试版本,WordPress 2.7 beta1。根据该版本,我们Wordpress 中文站制作了相应的中文版,给中文社区的网友们提供测试下载。WordPress 2.7 是 WordPress 2.5 以后的重大变革,甚至变动幅度要超过 WordPress 2.5。因此,我们建议网友们不要在正式博客中使用测试版,以便给你带来不必要的麻烦。
WordPress 2.7 beta1 中文版:
http://wordpresschina.googlecode.com/files/wordpress.27.beta1.chs.zip
WordPress 2.7 beta1 中文版(tar.gz版):
http://wordpresschina.googlecode.com/files/wordpress.27.beta1.chs.tar.gz
http://wordpresschina.googlecode.com/files/wordpress.27.beta1.chs.languages.only.zip
WordPress 2.7 beta1 中文语言包(tar.gz版):
http://wordpresschina.googlecode.com/files/wordpress.27.beta1.chs.languages.only.tar.gz
WordPress 2.7 测试站点
为了便于网友们体验 WordPress 2.7 新特性,我们还开放了一个 WordPress 2.7 演示站,欢迎各位网友登录尝试。
WordPress 2.7 演示站点地址:http://wp27.wpchina.org/
测试帐户:demo;
测试密码:demo。

