1{
expAll = 1 #sub menu all show
wrap = - |
1{
expAll = 1 #sub menu all show
wrap =
function generate_code(){
$code = "";
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
$i = 0;
while ($i <= 7) {
$num = rand() % 33;
$tmp = substr($salt, $num, 1);
$code = $code . $tmp;
$i++;
}
return $code;
}
1. 计算年数
你想通过生日来计算这个人有几岁了。
TYPO3 4.5 comes with the Swift Mailer library as the new mail API. It’s quite easy to use it in extensions. (continue reading…)
RewriteEngine on
#
# Redirect IE 5 and IE 6 requests to version-specific subdomains
RewriteCond %{HTTP_USER_AGENT} MSIE\ ([56])\. [OR]
RewriteCond %{HTTP_USER_AGENT} Windows\ NT\ 5\.1
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=302,L]
1、Rewrite规则简介:
Rewirte 主要的功能就是实现URL的跳转,它的正则表达式是基于Perl语言。可基于服务器级的(httpd.conf)和目录级的(.htaccess)两种方 式。如果要想用到rewrite模块,必须先安装或加载rewrite模块。方法有两种一种是编译apache的时候就直接安装rewrite模块,别一 种是编译apache时以DSO模式安装apache,然后再利用源码和apxs来安装rewrite模块。 (continue reading…)
Apache SSL examples in htaccess files
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
有些时候,当你在PHP里使用date或mktime函数时,由于时区的不同,它会显示出一些很奇怪的信息。下面是解决这个问题的方法之一。就是设置你的服务器的时区。你可以在这里找到所有支持的时区的清单。 (continue reading…)
$.each(ob,function(k,val){
if(k=='cname'){
var s = $.trim(ob.cname);
$("#nianji").append("<option value='"+s+"'>"+s+"</option>");
}
});
这个是全都支持的. $.trim()