本網站建議使用Firefox2.0以上,或是使用Goole瀏覽器來瀏覽,並使用1024x768解析度來觀看.
總共有以下幾種寫:
第一種寫法:這是為了舊版瀏覽器 IE 5.0 而使用的寫法,如下:
本文轉自:http://www.baihe107.com/web-design/common-css.html;
友好的css命名不僅有利於搜索引擎快速地渲染頁面,更有利於配合程序員高效的完成工作。以前也在藍色經典上見過這些,最近又參考了其他文章,做了一些總結,或許有些地方不是很適合,但作為參考,希望能與朋友們共享:
頁頭:header 內容:content/container 尾:footer 導航:nav 側欄:sidebar 欄目:column 頁面外圍控制整體佈局寬度:wrapper 左右中:left right center 登錄條:loginbar 標誌:logo 廣告:banner 頁面主體:main 熱點:hot 新聞:news 下載:download 子導航/二級導航:subnav 子頁面/二級頁面:subpage
下面幾個分別從網站分類,和有搜尋引勤蜘蛛程式的網站,本篇文章有部分轉載至免費網路社群。
由於最近在寫讀取資料庫時,一直在想用先用DB_num_rows取出值然後再用FOR去跑比較快,還是用WHILE去跑比較快,因此寫了一個小程式去跑看看
程式碼如下
function caclutime(){//時間計算FUNCTION
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$sql = "SELECT birth FROM `char_data` where id = '$this->id' ORDER BY job "; $l_sql = DB_mysql_query($sql); //時間測試-FOR $begin_time=caclutime(); $l_num = DB_num_rows($l_sql); $t=0; for($i=0;$i<$l_num;++$i){ $l_Var = DB_mysql_fetch_array($l_sql,MYSQL_ASSOC); $no = $l_Var["birth"]; $this->char[$no] = new char($no); $this->char[$no]->SetUser($this->id); $t++; } $end_time=caclutime(); $total=$end_time-$begin_time; echo "$total 秒 for 執行 $t 次:<br />";//顯示結果 $begin_time=caclutime(); $l_sql2 = DB_mysql_query($sql); //時間測試-while $t=0; while($l_Var = DB_mysql_fetch_array($l_sql2,MYSQL_ASSOC)){ $no = $l_Var["birth"]; $this->char[$no] = new char($no); $this->char[$no]->SetUser($this->id); $t++; } $end_time=caclutime(); $total=$end_time-$begin_time;
echo "$total 秒 while 執行 $t 次:";//顯示結果