PHP程序使用mail()函数发送邮件的时候,标题中文的话会出现乱码。
解决方法:
先用函数base64_encode() — 使用 MIME base64 对数据进行编码
标题字符串前加编码类型例如: =?UTF-8?B?
标题字符串后加:?=
邮件header说明Content-type — 防止邮件正文也乱码
举例:
- $to = ‘xinple@example.com‘;
- $subject = “=?UTF-8?B?“.base64_encode(‘邮件标题‘).“?=“;
- $headers = ‘MIME-Version: 1.0‘ . “\r\n“;
- $headers .= ‘Content-type: text/html; charset=utf-8‘ . “\r\n“;
- // Additional headers
- $headers .= ‘To: Xinple <xinple@example.com>‘ . “\r\n“;
- $headers .= ‘From: Admin <admin@example.com>‘ . “\r\n“;
- $headers .= ‘Reply-To: Xinple <xinple@example>‘ . “\r\n“;
- mail($to, $subject, $message, $headers);
MC._rotation 这些属性,尽管在把MC拖到场景中,用FLASH创作工具进行的旋转修改。
它的这些属性值也是存在并随之改变的,可以用AS读取出来。
stop();
//=========本站LOGO上的连接,AS3.0的URL连接方法==========
function GoToURL(event:MouseEvent){
var url=new URLRequest(”ht tp://www.flashas.net “) ;
navigateToURL(url) ;
}
logo_bt.addEventListener(MouseEvent.CLICK, GoToURL)
//================================================
//==============AS3.0调用本地SWF文件===============
var swfload = new Loader();
var swf:String = “1.swf”; //1
var swfok:URLRequest = new URLRequest(swf);//2
swfload.load(swfok); // 3 - 注意调用的SWF文件只能是本地文件
//swfload.load(new URLRequest(”1.swf”)); //可以将1,2,3集合成这一句
function johnny(event:MouseEvent) {
addChild(swfload); //添加对象
}
johnny_bt.addEventListener(MouseEvent.CLICK, johnny); //AS3.0按钮事件
swfload.x=swfload.y=88; //定义1.swf在场景中的坐标
//====================================================
//===========删除调用的本地SWF文件===================
function johnny_del(event:MouseEvent) {
removeChild(swfload); //删除对象
}
johnny_bt_del.addEventListener(MouseEvent.CLICK, johnny_del);
//====================================================
(转自天地会论坛)
一个小程序,希望大家能用上,很简单的.
addEventListener (MouseEvent.CLICK, getButtonName); //对舞台上的所有按钮和影片剪辑进行侦听
//判断鼠标点击的那个影片剪辑或者按钮,并执行相应的函数
function getButtonName(evt:MouseEvent)
{
switch(evt.target.name)
{
case “btn1″:
func1()
break;
case “btn2″:
func2()
break;
default:
return;
}
}