合肥網(wǎng)站建設
文章閱讀
網(wǎng)建技巧
優(yōu)化技巧
網(wǎng)建問題
謹宸新聞
行業(yè)新聞

首頁 > 合肥網(wǎng)站建設 > 正文

apache開啟ssi

發(fā)布時間:2011/05/03字體:
摘要:apache開啟ssi,apache如何開啟ssi,apache開啟ssi技術,2種方法開啟apache中ssi,使得apache支持ssi,在httpd.conf中修改 ,在網(wǎng)站根目錄下加入以下代碼,即可開通ssi

2種方法開啟apache中ssi,使得apache支持ssi

在httpd.conf中修改
1:
找到#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
去掉前面的#

2,在網(wǎng)站根目錄下加入以下代碼,即可開通ssi
在根目錄(虛禮目錄)中加---
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Includes FollowSymLinks MultiViews
# ~~~~~~~~ <= INCLUDES 啟動shtml腳本中用
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

(新浪發(fā)布新聞差不多的)例子:站點根目錄為(虛禮目錄):F盤
在f盤下面建立公用調(diào)用數(shù)據(jù)庫文件,header.php
header.php:
echo "這里是header部分輸出的文字";
?>
由后臺生成靜態(tài)頁面: F:/html/2008/11/5/173710234.shtml
另外在f:/下建立,x.shtml
x.shtml:

瀏覽可以得出:這里是header部分輸出的文字

上方就是一個簡單的ssi技術實例

173710234.shtml:

瀏覽出錯,因為file命令只能調(diào)用相對根目錄下的文件,簡單的說能往下包含,不能往上包含。

173710234.shtml:

瀏覽可以得出:這里是header部分輸出的文字

比較得到,file和virtual的不同。
   file 指定包含文件相對于本文檔的位置
   virtual 指定相對于服務器文檔根目錄的位置

通過以上2中方法既可讓apache開啟ssi功能

本文標題:apache開啟ssi
本文網(wǎng)址:http://www.fn9c.com/wangjianjiqiao/43.html
原創(chuàng)網(wǎng)址:合肥網(wǎng)絡公司<謹宸科技> 版權所有,轉(zhuǎn)載請注明出處,并以鏈接形式鏈接網(wǎng)址:www.fn9c.com
文章標簽:apachessi
 上一篇:mysql中union和union all的區(qū)別和注意點
 下一篇:謹宸調(diào)整午休時間