看板 PHP 關於我們 聯絡資訊
A PHP Error was encountered Severity: Notice Message: Undefined index: base_url Filename: core/Config.php Line Number: 67 將外包做的網站載到本機local端時遇到的錯誤訊息 此錯誤訊息是第一個 依照訊息來看是以下這段有錯誤 function __construct() { $this->config =& get_config(); log_message('debug', "Config Class Initialized"); // Set the base_url automatically if none was provided if ($this->config['base_url'] == '') { if (isset($_SERVER['HTTP_HOST'])) { $base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http'; $base_url .= '://'. $_SERVER['HTTP_HOST']; $base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); } else { $base_url = 'http://localhost/1match/'; } $this->set_item('base_url', $base_url); } } 麻煩高手幫忙一下! 還有另外兩個錯誤訊息也是找不到辦法 有高手願意碰面幫忙我可以請喝咖啡喝茶~ 榆年^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.227.175.103 ※ 文章網址: http://www.ptt.cc/bbs/PHP/M.1396854404.A.F93.html
mesak:沒事不用動到 system 下的code 你應該去 app/config/config 04/07 15:31
mesak:.php 裡面修改 $config['base_url'] 04/07 15:32
mesak:會出現 行67 有問題,應該是 你連 CONFIG 這個檔案都沒讀到 04/07 15:33
RedMapleWing:路徑有點怪…config怎麼會在core底下? 04/08 15:52
missylive:感謝!改過app/config/config裡面的檔案之後就可運作了 04/10 15:24