网站性能优化
Standard用Ajax提高用户体验
如点击下载计数器一类的请求可经由ajax执行
SVN update in post-commit hook
Standard修改SVN库中post-commit文件 操作如: cd /var/www/svn/repos/hooks/ cp post-commit.tmpl post-commit chown apache:apache post-commit chmod a+x post-commit vi post-commit
SVN on CentOS
Standard1) Installation: The first thing to do is to install the packages I mentioned above. If you don't have Apache installed already, it'll go ahead and drag that down as well. [root@lucifer ~]# yum install mod_dav_svn subversion 2) Configurations: a) Apache: ... b) Subversion's Apache configs:
PHP用GD生成验证码
Standardvalidatecode.php function random($len){...}
PHP分页函数
Standard$sql="SELECT * FROM tb"; //取得总信息数 $result=mysql_query($sql); $total=mysql_num_rows($result); //调用pageft(),每页显示10条信息(使用默认的20时,可以省略此参数),使用本页URL(默认,所以省略掉)。 pageft($total,10,"http://www.yemaosheng.com/index"); //现在产生的全局变量就派上用场了: $result=mysql_query($sql." limit $firstcount,$displaypg");
Linux CVS配置
Standard运行rmp -qa | grep "cvs"以确定系统已经安装有CVS Server 1)进入 /etc/xinetd.d 目录,编辑一个 cvspserver 的文件,文件内容如下: 2)修改 /etc/services 文件 3)创建 cvs 组和 cvs 用户
Linux crontab格式及配置文件
Standard配置文件 vi /etc/crontab 第1列分钟1~59 第2列小时1~23(0表示子夜) 第3列日1~31 第4列月1~12 第5列星期0~6(0表示星期天) 第6列要运行的命令 下面是crontab的格式: 分 时 日 月 星期 要运行的命令
Div Drag 鼠标拖放
Standardemu's div-drag
PHP数据库存储session
StandardFirst up, we need to create a table to handle the session data, and here's how it will look: CREATE TABLE sessions (ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY, SessionID CHAR(26), Data TEXT DEFAULT '', DateTouched INT); Now, session operations script