2010年05月23日
by 江小邪
0 comments
mysql my.cnf文件常见优化模块
[mysqld]
port = 3306
server-id = 1
socket = /tmp/mysql.sock
# 避免MySQL的外部锁定,减少出错几率增强稳定性。
skip-locking
# 禁止MySQL对外部连接进行DNS解析
skip-name-resolve
# 指定MySQL可能的连接数量
back_log = 256
(更多…)
标签Tags:
cache,
div,
ie,
mod,
mysql,
path,
PHP,
server,
session,
sql,
人,
代码,
兼容,
函数,
含义,
密码,
属性,
引入,
成功,
搜索,
操作系统,
数据,
数据库,
最快,
服务器构建&安全,
版本,
程序,
类,
系统,
表,
解决,
连接,
错误,
镜像,
页面
服务器构建&安全
2007年03月21日
by 江小邪
0 comments
如果一个网站有多个镜像站的话,使用本文的方法可以使得用户自动跳转到其访问速度最快的那个镜像站上。
直接将下面代码加入到<body></body>中
<script>
i=1
var autourl=new Array()
autourl[1]="tel.5bay.cn"
autourl[2]="cnc.5bay.cn"
function auto(url){if(i){i=0;top.location=url}}
function run(){for(var i=1;i<autourl.length;i++)document.write("<img src=http://"+autourl+" width=1 height=1 onerror=auto('http://"+autourl+"')>")}
run()
</script>
标签Tags:
JavaScript&Ajax,
最快,
自动打开,
镜像
JavaScript&Ajax