最新 分享

Publish our news and thoughts with all.

Popular Articles

Recent Stories

RewriteCond和13个mod_rewrite应用举例Apache伪静态

1.给子域名加www标记 RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .? http://www.xample.com%{REQUEST_URI} [R=301,L] 这个规则抓取二级域名的%1变量,如果不是以www开始,那么就加www,以前的域名以及{REQUEST_URI}会跟在其后。

How to Install a LAMP Stack on Ubuntu 14.04

Before You Begin

  1. Ensure that you have followed the Getting Started and Securing Your Server guides, and the Linode’s hostname is set.To check your hostname run:
    1
    2
    hostname
    hostname -f
    
    The first command should show your short hostname, and the second should show your fully qualified domain name (FQDN).
  2. Update your system:
    1
    sudo apt-get update && sudo apt-get upgrade
    

mysql列赋值列,将表1的某列的值赋给另一表的某列

update la6y3_content a,la6y3_k2_items b set b.alias=a.alias where b.title=a.title

PHP date()函数参数详解

time()函数在PHP中是得到一个数字,这个数字表示从1980-03-05到现在一共是多少秒,很奇怪,不过这样方便计算。 要找出前一天的时间就是 time()-60*60*24; 要找出前一年的时间就是 time()*60*60*24*365 那么如何把这个数字换成日期格式呢 ,就要用到date()函数了

mysql修改表、字段、库的字符集

修改数据库字符集:

ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];

最近在捣鼓google map的开发

Code Playground ,好像里面有很多代码实例:

http://code.google.com/apis/ajax/playground/?exp=maps#map_simple

域名301跳转到另一个域名

<?php
$url="http://原域名".$_SERVER["REQUEST_URI"];
header("HTTP/1.1 301 Moved Permanently");
header ("Location:$url");
?>

linode ubuntu 删除access.log

貌似不能直接删除后重启apache的,