範例:
$t=time();
echo date("Y-m-d H:i:s",$t);
第一個參數的格式分別表示:
a - "am" 或是 "pm"
A - "AM" 或是 "PM"
d - 幾日,二位數字,若不足二位則前面補零; 如: "01" 至 "31"
D - 星期幾,三個英文字母; 如: "Fri"
F - 月份,英文全名; 如: "January"
h - 12 小時制的小時; 如: "01" 至 "12"
H - 24 小時制的小時; 如: "00" 至 "23"
g - 12 小時制的小時,不足二位不補零; 如: "1" 至 12"
G - 24 小時制的小時,不足二位不補零; 如: "0" 至 "23"
i - 分鐘; 如: "00" 至 "59"
j - 幾日,二位數字,若不足二位不補零; 如: "1" 至 "31"
l - 星期幾,英文全名; 如: "Friday"
m - 月份,二位數字,若不足二位則在前面補零; 如: "01" 至 "12"
n - 月份,二位數字,若不足二位則不補零; 如: "1" 至 "12"
M - 月份,三個英文字母; 如: "Jan"
s - 秒; 如: "00" 至 "59"
S - 字尾加英文序數,二個英文字母; 如: "th","nd"
t - 指定月份的天數; 如: "28" 至 "31"
U - 總秒數
w - 數字型的星期幾,如: "0" (星期日) 至 "6" (星期六)
Y - 年,四位數字; 如: "1999"
y - 年,二位數字; 如: "99"
z - 一年中的第幾天; 如: "0" 至 "365"
其他不在上列的字元則直接列出該字元
strtotime("+1 week")
$tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y"));
$lastmonth = mktime (0,0,0,date("m")-1,date("d"), date("Y"));
$nextyear = mktime (0,0,0,date("m"), date("d"), date("Y")+1);
echo date( "Y-m-d H:i:s", mktime (0,0,0,date("m") ,date("d")-7,date("Y")) );
echo date( "Y-m-d H:i:s", mktime (0,0,0,date("m") ,date("d"), date("Y")) );
下方是官方的XOOPS Smarty變數,請在此核對並更新,當XOOPS 2更改變數時更改或增加之。
Theme變數
<{$xoops_meta_keywords}>
從Meta/Footer設定中插入關鍵字列表
(meta 標籤信息)
<{$xoops_meta_description}>
插入站點的描述到meta 標籤
<{$meta_copyright}>
插入copyright文本到 meta 標籤
<{$meta_robots}>
插入W3C robot資訊到meta標籤
<{$meta_rating}>
插入等級資訊到meta 標籤
<{$xoops_sitename}>
插入站點名字
<{$xoops_pagetitle}>
插入頁面的title
<{$xoops_themecss}>
插入 style.css
(注:上述變數的任何組合均用於插入您喜好的資訊到meta標籤)
<{$xoops_url}>
插入站點的URL
<{$xoops_js}>
插入XOOPS javascript 代碼
<{$xoops_banner}>
顯示 banners條
<{foreach item=block from=$xoops_lblocks}>
<{$block}>
<{/foreach}>
顯示左邊區塊(block)的代碼段
<{if $xoops_showcblock == 1}>
用於顯示中間區塊的系統測試
<{foreach item=block from=$xoops_ccblocks}>
<{$block}>
<{/foreach}>
顯示中間區塊的代碼段
<{foreach item=block from=$xoops_clblocks}>
<{$block}>
<{/foreach}>
顯示中間區塊-左的代碼段
<{foreach item=block from=$xoops_crblocks}>
<{$block}>
<{/foreach}>
顯示中間區塊-右的代碼段Code snippet to show the center-right blocks
<{$xoops_contents}>
顯示新聞和其他內容
<{if $xoops_showcblock == 1}>
顯示中間區塊的測試
<{if $xoops_showrblock == 1}>
顯示右邊區塊的測試
<{foreach item=block from=$xoops_rblocks}>
<{$block}>
<{/foreach}>
顯示右邊區塊的代碼段
<{$xoops_footer}>
顯示頁腳(footer)
<{$xoops_isadmin}>
如果訪問者是管理員,則為True
<{$xoops_isuser}>
如果訪問者是註冊用戶,則為True
<{$xoops_userid}>
成員的用戶 ID
<{$xoops_uname}>
成員的用戶名
語言選項
<{$xoops_charset}>
編碼選項
內容滿豐富的,相信看過之後對於如何設定CSS有很大的幫助。
CSS 全攻略
CSS的出現其實是一次革命,它試圖將網站的內容與表現分開。
來源:http://www.pczone.com.tw/vbb3/archive/t-116057.html
L-BLOG: http://www.loveyuki.com
Dlog: http://www.dcshooter.com/dlog/
http://www.duoluo.com/webdream/dlog/
exBlog: http://exblog.fengling.net/
Bo-Blog: http://www.bo-blog.com/
R-Blog: http://rays.512j.com/
迷死六個: http://www.misslog.com/
O-Blog: http://her.com.ru/
boeiblog: http://myblog.boei.cn/
SaBlog: http://www.4ngel.net/
中國龍Blog: http://www.yascool.com/
我愛我家: http://www.oioj.net/blog/
DLOG4J: http://www.javayou.com/
SimpleBits: http://www.teamod.name/v2/
Terac Miracle: http://www.terac.com/
HUS Reviv@l: http://bynorman.51z.cn
Surfer Blog: http://www.iexper.com/blog/
門丁派的iBook: http://www.mending.cn/ibook/
L3X™ BLOG: http://lexrus.blueidea.com/
M-logger: http://milkliker.512j.com/
ASP 類
L-Blog: http://www.loveyuki.com
Dlog: http://webdream.duoluo.com
Misslog: http://www.misslog.com/blog (多用戶blog,使用UTF-8編碼,支持簡繁轉換!)
theAnswer: http://bravetime.com/dev/
cixiblog: http://blog.ic5.cn/blog (asp+sqlserver存儲過程+xml+asp緩存技術的多用戶網絡日誌程序 )
oblog: http://www.oioj.net (是多用戶版本的Blog,實現了Blog的大部分功能,發展很快,現在已經出了SQL商業版本了。 )
blogx: http://www.blanksoft.com/blogx/
天暢博客: http://www.skycx.com/blog/ (非常簡單小巧,但不支持RSS)
dblog: http://www.dblog.it/dblog/
BP Blog: http://www.betaparticle.com/blog/
Matthew1471's BlogX: http://blogx.co.uk/Main.asp
ASP.NET
DotText: http://scottwater.com/Dottext/default.aspx (非常強大的多用戶blog,國內很多大型網站在用,但安裝調試非常複雜,有很多漢化版下載。 )
BlogX: http://www.simplegeek.com/CategoryView.aspx/BlogX (這裡有一個blogx的中文修改版 http://www.blanksoft.com/blogx.asp )
dasBlog: http://www.dasblog.net (新出來的程序,功能也比較齊全 )
PHP
b2: http://www.cafelog.com php (blog的老祖宗,操作簡單,容易上手,現在好像停止了開發。 )
b2evolution: http://www.b2evolution.net (B2多用戶版,有很多風格和插件。 )
wordpress: http://www.wordpress.org (在B2的基礎上開發的,添加了很多功能。 )
pivot: http://www.pivotlog.net (PHP+XML,沒有使用資料庫,有中文語言包,)
nucleus: http://www.nucleuscms.org (這個也是比較老牌的程序了,有中文語言包! )
exBlogMix: http://exblog.fengling.net (功能很強大的blog,更新很快,推薦使用。 )
M-logger: http://miracle.shakeme.net (文字檔案儲存資料 , 免資料庫)
bo-blog: http://www.bo-blog.com/ (文字檔案儲存資料 , 免資料庫)
drupal: http://www.drupal.org
O-BLOG: http://her.com.ru/ (需在PHP+MYSQL環境下運行,採用 SMARTY 模板,HTMLAREA編輯器)
R-Blog: http://rays.512j.com/ (採用PHPLIB模版引擎,程序與美工基本分離,改版比較方便 )
boeiblog: http://myblog.boei.cn
SaBlog: http://www.4ngel.net/project/sablog.htm (安全天使小組開發的一個簡單易用的blog,支持模板 )
Pmschine: http://www.pmachine.com
bBlog: http://dev.bblog.com/ (簡潔好用的blog,簡體中文版: http://www.xptop.com/lei/ )
serendipity: http://www.s9y.org (功能很多,每個功能以模塊方式安裝,界面也很容易修改。 )
bMachine: http://boastology.com (同時支持文字檔案和MySQL資料庫庫,支持中文搜索。 )
Plog http://www.plogworld.org/ (多用戶,博客中國,blogit都是用這個改的。)
Plainslash: http://www.51zhao.com/plainslash/ (文字blog程序,作者很久沒更新了,但現在blog的基本功能都有了。 )
Simple Blog : http://www.bigevilbrain.com/sphpblog ( 國外的一個文字的小型blog,代碼和界面都很簡潔。 )
Tatter Toolkit : http://www.tattertools.com (韓國人開發的 Blog,界面美觀,功能很全。簡體中文站:http://e345.com.ru)
myphpblog: http://www.myphpblog.org/
sunlog: http://www.sunlog.org
RCBlog: http://rcsoft.co.nr/
Twoblog: http://www.twoblog.com/
CGI
MT: http://www.movabletype.org (世界上用戶最多的blog程序,自動生成html!後綴可以自己設置,支持文本數據庫和mysql,mssql等! )
Greymatter: http://www.noahgrey.com/greysoft/ (是一個類似 Movable Type 的Blog程序非常簡單,也是生成靜態文件。 )
HUS Reviv: http://supermanc.51.net/norman/blog.cgi (功能強大,但由於cgi語言的問題,安裝調試比較複雜,而且很占資源。 )
Blosxom: http://www.blosxom.com (很老的一個程序了,也可能是世界上最小的blog系統了,只有一個文件卻實現了blog的大部分功能! )
JSP
DLOG4J: http://dlog4j.sourceforge.net/ (簡體中文官方站: http://www.javayou.com )
TM: http://www.terac.com (支持檔案上傳、RSS、評論、WYSIWYG 編輯器等功能,多種語言)
snipsnap: http://snipsnap.org/space/start (wiki和blog結合的東東,開源項目,支持多國語言。)
在theme.html裡,你要的位置加入:
<!-- 檢查使用者及顯示登入畫面 -->
<div id="nav"><div class="spacer"></div>
<div class="row">
<span class="left">
<{if $xoops_isuser}>
<img src="<{$xoops_imageurl}>arrow4.jpg" alt="">歡迎 <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>
<{else}>
<form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><img src="<{$xoops_imageurl}>bullet.jpg" alt="">使用者名稱:<input type="text" name="uname" size="12" value="<{$block.unamevalue}>" maxlength="25">密碼:<input type="password" name="pass" size="12" maxlength="32"><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>"><input type="hidden" name="op" value="login"><input type="submit" value="登入"></form>
<{/if}></span>
<span class="right">
<{if $xoops_isuser}>
<img src="<{$xoops_imageurl}>arrow2.jpg" alt=""><a href="<{$xoops_url}>/user.php?op=logout">登出</a>
<{else}>
<{/if}>
</span>
</div><div class="spacer"></div></div>
<!-- 登入使用者區塊結束 -->
--------------
自己玩 theme:
<{$xoops_isadmin}> 檢查是否為admin,用法如<{$xoops_isuser}>
以下供參考:
<{$xoops_isuser}> - 1 if user is logged in, 0 if anonymous user
<{$xoops_uname}> - User name
<{$user_method}> - Logged in user's preferred notification method
<{$xoops_isadmin}> - 1 if admin, 0 if not (Admin rights to System module is the deciding factor - no other modules are considered)
<{$xoops_userid}> - User's ID
<{$xoops_charset}> - Charset used on the page, e.g. ISO-8859-1
<{$xoops_langcode}> - language code used for page (e.g. en for English)
<{$xoops_sitename}> - Site Name
<{$xoops_slogan}> - Site Slogan
<{$xoops_pagetitle}> - Page Title
<{$xoops_version}> - Xoops Version
<{$xoops_theme}> - Name of theme folder
<{$xoops_themecss}> - URL to theme's css file
<{$SCRIPT_NAME}> - path to file name requested from xoops root (e.g. modules/news/index.php)
<{$xoops_imageurl}> - URL to theme folder
<{$xoops_requesturi}> - requested url (e.g. /modules/news/article.php?storyid=1)
<{$xoops_rootpath}> - path to xoops root
<{$xoops_upload_url}> - URL to xoops uploads directory
<{$xoops_url}> - URL to xoops root
1.先將舊的資料夾刪除
rm -Rf /var/www/lifetype
2.備齊相關資料mysql 的帳號 密碼 所要安裝的資料庫名稱
3.請至http://lifetype.net/下載lifetype-1.2.8.tar.gz
tar zxvf lifetype-1.2.8.tar.gz
mv lifetype-1.2.8 /var/www/lifetype
4.chmod 777 /var/www/lifetype/config/config.properties.php
以下這兩項理論上已經是777
chmod 777 /var/www/lifetype/tmp
chmod 777 /var/www/lifetype/gallery
5.打開瀏覽器網址:http://你的網址/lifetype/wizard.php
把相關設定打進去
6.chmod 644 /var/www/lifetype/config/config.properties.php
將此檔案權限改回來
7.rm -Rf /var/www/lifetype/wizard.php
要先做完6 、7兩項才能完成安裝
8.更改/var/www/lifetype/.htaccess如下
RewriteBase /lifetype/
ErrorDocument 401 /lifetype/error.php
ErrorDocument 403 /lifetype/error.php
ErrorDocument 404 /lifetype/error.php
DirectoryIndex summary.php
9.編輯 /et/apache2/apache2.conf
加上
<Directory "/var/www/lifetype">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
重新開啟apache2
10.將templates擁有者改為www-data以便使用模組編輯器
台中市某國中資訊組長.....
1.何謂eclass?
架設班級網站的php and mysql 套件
2.安裝方法下載
請到這邊下載
http://1001.idv.tw/
3.安裝前修改方式
a. 修改php.ini
欲執行《MyeClass架站機》程式,請務必更改php.ini的兩項參數設定,請更改為以下:
=============================================
1.short_open_tag = On
2.register_globals = On
=============================================
注意
b2d預設register_globals = Off
因此要放在個人家目錄中要設定
/home/user/.htaccess
======================================
加入
php_value register_globals on
======================================
跟 修改
/etc/apache2/mods-available/userdir.conf
======================================
加入
AllowOverride All
註解掉
AllowOverride FileInfo AuthConfig Limit
變成
#AllowOverride FileInfo AuthConfig Limit