望。
专业的事,交给专业的做!
邮件 地址,那就找phpmailer这个类!
从中提取的函数
function ValidateAddress($address) {
if (function_exists('filter_var')) { //Introduced in PHP 5.2
if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {
return false;
} else {
return true;
}
} else {
return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address);
}
}
日本邮箱,有的时候在三级域名上,所以可以用下面的匹配!
"/^[_\.0-9a-z-]+@([0-9a-z-]+\.[0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}/i";
//这个是php5.2开始更新的内容,这个是phpmailer的用法!
function ValidateAddress($address) {
if (function_exists('filter_var')) { //Introduced in PHP 5.2
if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {
return false;
} else {
return true;
}
} else {
return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address);
}
}
这个是为了多版本操作方便!
开始
var winform= winform.loadForm("\sub.aau");
winform.show(true);
我做了修改,现在这样,就可以做版本调试!
var winform= winform.loadForm("\sub.1aau");
winform.show(true);
第二版本
var winform= winform.loadForm("\sub2.aau");
winform.show(true);
/*DSG{{*/
var winform = win.form(parent=...; text="随机关键字测试";right=661;bottom=423 )
winform.add(
txt_getover={ bottom=260;text="";left=291;multiline=1;top=10;z=5;right=644;edge=1;cls="richedit" };
txt_content={ bottom=259;right=278;left=13;multiline=1;top=8;z=1;text="这个。我是。用。来。测试的。都是。
还有什么。都可以输出来测试。";edge=1;cls="richedit" };
txt_count={ bottom=300;right=586;left=546;text="static";top=281;transparent=1;z=4;cls="static" };
btn_test={ bottom=332;right=464;left=235;top=273;z=3;text="测试";cls="button" };
txt_link={ bottom=331;text='<a href="http://www.sofut.com">\xBD\xA8\xD5\xBE</a>';left=14;multiline=1;top=275;z=2;right=223;edge=1;cls="edit" }
)
/*}}*/
winform.btn_test.oncommand = function(id,event){
//win.msgbox( winform.btn_test.text );
var tab1 = string.split(winform.txt_content.text,"<。>");
winform.txt_getover.text = "";
winform.txt_count.text = #tab1;
k = math.random(1,#tab1);
for(i =1;#tab1;1)
{
if(i==k)
{
winform.txt_getover.text += tab1[i]+""+winform.txt_link.text;
}
else {
winform.txt_getover.text += tab1[i]+"。";
}
}
//winform.txt_getover.text = string.replace(winform.txt_getover.text,"。。","。");
}
winform.show()
win.loopMessage();
return winform;
发言老是失败!
真是杯具!
开始登入YAPlog,时间2011年12月10日 16时23分59秒
登入mysql成功
链接数据库成功
黛维莉燕窝素-亮白抗辐射粉底霜*象牙白/自然白 过滤保护发表成功0,时间2011年12月10日 16时24分52秒
文章发表好了
退出第一个帐号
开始登入YAPlog,时间2011年12月10日 16时26分07秒
登入mysql成功
链接数据库成功
黛维莉燕窝素-亮白抗辐射粉底霜*象牙白/自然白 过滤保护发表成功0,时间2011年12月10日 16时27分19秒
文章发表好了
退出第一个帐号













