[請益] PHP CodeIgniter 新手問題請教

作者: missylive (Missy)   2014-04-07 15:06:42
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);
}
}
麻煩高手幫忙一下!
還有另外兩個錯誤訊息也是找不到辦法
有高手願意碰面幫忙我可以請喝咖啡喝茶~ 榆年^^
作者: mesak (阿米)   2014-04-07 15:31:00
沒事不用動到 system 下的code 你應該去 app/config/config.php 裡面修改 $config['base_url']會出現 行67 有問題,應該是 你連 CONFIG 這個檔案都沒讀到
作者: RedMapleWing (闇夜 楓)   2014-04-08 15:52:00
路徑有點怪…config怎麼會在core底下?
作者: missylive (Missy)   2014-04-10 15:24:00
感謝!改過app/config/config裡面的檔案之後就可運作了

Links booklink

Contact Us: admin [ a t ] ucptt.com