精華區beta PHP 關於我們 聯絡資訊
剛開始用Win7 就遇到下面問題 簡單的說就是找不到 Win7 php環境下的"/config/config.php" 設定檔 整個問題詳述如下 我環境為: Win 7 appserv-win32-2.5.10 使用phpMyAdmin正常 開啟在 自訂的 網頁路徑 會出現以下訊息 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. 上網查了一下解決方法應該是 http://yiyingloveart.blogspot.tw/2012/09/codeigniter500-internal-server-error.html 還有 http://stackoverflow.com/questions/6674689/codeigniter-500-internal-server-error 縮網址 http://ppt.cc/CH~q 其中後者那個裡面 提到 create ".htaccess" on root directory ------------------ DirectoryIndex index.php RewriteEngine On RewriteCond $1 !^(index\.php|themes|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] ------------------ 是指在 httpd.conf 裡面加入這段文字嗎 因為我已經加入了 但還是有錯誤訊息 應該是下面的步驟沒做 Make change on CodeIgniter config file 「/config/config.php」 change index.php to empty. ------------------ |-------------------------------------------------------------------------- | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = ''; ------------------- 但是我一直找不到文中的 "/config/config.php" 在哪裡 有朋友知道在哪裡嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.40.84.16
tyf99:Make change on CodeIgniter config file 12/02 20:53
cychi:要你改CI的config.php檔 看你已經改好了 12/02 23:42
cychi:還有你有裝modrewrite嗎 要打開 把寫有rewrite rule的 12/02 23:43
cychi:.htaccess檔放在網站的根目錄 12/02 23:44
cychi:CI的config檔預設是在application/config/config.php 12/02 23:45
cychi:要建立.htaccess請用編輯器開一個純文字文件 把你中間那段 12/02 23:48
cychi:rewrite的規則寫入然後存成.htaccess 注意不要有附檔名.txt 12/02 23:49