發(fā)表日期:2019-12 文章編輯:小燈 瀏覽次數(shù):4282
什么是SSI?
SSI是英文Server Side Includes的縮寫,翻譯成中文就是服務(wù)器端包含的意思。從技術(shù)角度上說,SSI就是在HTML文件中,可以通過注釋行調(diào)用的命令或指針。SSI具有強大的功能,只要使用一條簡單的SSI命令就可以實現(xiàn)整個網(wǎng)站的內(nèi)容更新,時間和日期的動態(tài)顯示,以及執(zhí)行shell和CGI腳本程序等復(fù)雜的功能。
如何使你的Apache服務(wù)器支持SSI?
Apache默認(rèn)是不支持SSI的,需要我們更改httpd.conf來進(jìn)行配置。我這里以windows平臺的Apache 2.0.x為例:打開conf目錄下的httpd.conf文件,搜索“AddType text/html .shtml”,搜索結(jié)果:
# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml
把這兩行前面的#去掉。
然后搜索“Options Indexes FollowSymLinks”
在搜索到的那一行后面添加“ Includes”
即將該行改變?yōu)椋?/p>
Options Indexes FollowSymLinks Includes
保存httpd.conf,重起apache即可。
開啟shtml
打開文件 ./include/config.inc.php
<?php
//數(shù)據(jù)庫配置信息
define('DB_HOST', 'localhost'); //數(shù)據(jù)庫服務(wù)器主機(jī)地址
define('DB_USER', 'root'); //數(shù)據(jù)庫帳號
define('DB_PW', 'root'); //數(shù)據(jù)庫密碼
define('DB_NAME', 'phpcmsutf'); //數(shù)據(jù)庫名
define('DB_PRE', 'phpcms_'); //數(shù)據(jù)庫表前綴,同一數(shù)據(jù)庫安裝多套Phpcms時,請修改表前綴
define('DB_CHARSET', 'utf8'); //數(shù)據(jù)庫字符集
define('DB_PCONNECT', 0); //0 或1,是否使用持久連接
define('DB_DATABASE', 'mysql'); //數(shù)據(jù)庫類型
//網(wǎng)站路徑配置
define('PHPCMS_PATH', '/cms/phpcms_utf/'); //Phpcms框架訪問路徑,相對于域名
//shtml 支持
define('SHTML', 0); //是否支持 shtml,需要服務(wù)器支持,并且生成文件擴(kuò)展名為 shtml
將它:
define('SHTML', 0); //是否支持 shtml,需要服務(wù)器支持,并且生成文件擴(kuò)展名為 shtml
改成:
define('SHTML', 1); //是否支持 shtml,需要服務(wù)器支持,并且生成文件擴(kuò)展名為 shtml
日期:2019-12 瀏覽次數(shù):5125
日期:2019-12 瀏覽次數(shù):4530
日期:2019-12 瀏覽次數(shù):4281
日期:2019-12 瀏覽次數(shù):4529
日期:2019-12 瀏覽次數(shù):4657
日期:2019-12 瀏覽次數(shù):4435
日期:2019-12 瀏覽次數(shù):4711
日期:2019-12 瀏覽次數(shù):4348
日期:2019-12 瀏覽次數(shù):4874
日期:2019-12 瀏覽次數(shù):4869
日期:2019-12 瀏覽次數(shù):4632
日期:2019-12 瀏覽次數(shù):5194
日期:2019-12 瀏覽次數(shù):4622
日期:2019-12 瀏覽次數(shù):4427
日期:2019-12 瀏覽次數(shù):4522
日期:2019-12 瀏覽次數(shù):4401
日期:2019-12 瀏覽次數(shù):4677
日期:2019-12 瀏覽次數(shù):4489
日期:2019-12 瀏覽次數(shù):4523
日期:2019-12 瀏覽次數(shù):5889
日期:2019-12 瀏覽次數(shù):4972
日期:2019-12 瀏覽次數(shù):4351
日期:2019-12 瀏覽次數(shù):4372
日期:2019-12 瀏覽次數(shù):4456
日期:2019-12 瀏覽次數(shù):5180
日期:2019-12 瀏覽次數(shù):4313
日期:2019-12 瀏覽次數(shù):4277
日期:2019-12 瀏覽次數(shù):4573
日期:2019-12 瀏覽次數(shù):4178
日期:2019-12 瀏覽次數(shù):4474
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.