| 作者 |
主題 |
sinye
註冊會員
性別:女
來自:
發表總數:2
註冊時間:2005-01-21 12:08 |
(第 1 篇) 【求助】.htaccess影響開啟htm檔??
本來在首頁連結了html的網頁,是可以開的
但剛剛突然不能開了
出現了這個錯誤訊息
| 代碼: | Parse error: syntax error, unexpected T_STRING in D:\Webs\melic\index.htm on line 1
|
該首頁的第一行是
<?xml version="1.0" encoding="BIG5"?>
後來發現問題是根目錄下設了一個.htaccess
內容為
DirectoryIndex index.html index.htm index.php
AddType application/x-httpd-php .html .htm
php_value auto_prepend_file D:/Webs/tt/refer/refer.php
如果我取消這個檔
就可以正常開啟
請問這是為什麼啊??
本帖由sinye最後編輯於2005-03-07 02:12 |
| 發表時間:2005-03-07 02:08 |
|
dc
管理員

性別:男
來自:瓦肯星
發表總數:11790
註冊時間:2002-05-07 16:32 |
(第 2 篇)
利用 .htaccess 保護網頁
http://omega.idv.tw/kdb120/viewthread.php?threadid=40
Your mind to my mind,
your thought to my thought |
| 發表時間:2005-03-08 00:15 |
|
sinye
註冊會員
性別:女
來自:
發表總數:2
註冊時間:2005-01-21 12:08 |
(第 3 篇)
嗯…我還是有點不太了解
如果設定 | 代碼: | | DirectoryIndex index.htm | 在 melic 目錄下
還是無法開啟 index.htm
但 melic 目錄下真的有 index.htm
| 代碼: | | DirectoryIndex index.html index.htm index.php |
這行的意思不是指,當如果找不到 index.html
就找 index.htm
否則就是 index.php 嗎?
|
| 發表時間:2005-03-12 21:23 |
|
jaceju
註冊會員
性別:男
來自:
發表總數:1
註冊時間:2004-02-26 21:38 |
(第 4 篇)
請注意這行:
AddType application/x-httpd-php .html .htm
它的意思是把 .html 和 .htm 當成 php 來執行,而且您的 PHP.INI 應該有打開短標籤 (short_open_tag = On) ;所以會使得 PHP 引擎把 <?xml ... ?> 當成是 PHP 來執行,因此就會出現錯誤。
解決方式:把 short_open_tag 設為 Off 。
|
| 發表時間:2005-03-22 11:21 |
|
|
所有時間均為GMT+8, 現在是2026-10-24 18:50 |