我在主页上遇到以下错误。请帮我解决此错误
Strict Standards: Declaration of AI_Exceptions::show_404() should be compatible with CI_Exceptions::show_404($page = ) in /home/enjoythe/public_html/application/libraries/AI_Exceptions.php on line 32
AI_Exceptions.php文件包含
/**
* Exceptions Class that extends the codeIgniter Core Exceptions Class.
*
* @author Prasanna_13AG04
* @copyright Copyright (c) 2007 {@link http://www.agriya.com Agriya Infoway}
* @license http://www.agriya.com Agriya Infoway Licence
* @since Nov 26, 2008
*/
class AI_Exceptions extends CI_Exceptions
{
/**
* Constructor
*/
function __construct()
{
//call the parent class constructor
parent::__construct();
//Log the loading of this class
log_message('debug', "AgriyaIgniter Exceptions Class Initialized");
}
function show_404($page)
{
$config =& get_config();
header('Location: ' . $config['base_url'] . $config['index_page'] . 'pagenotfound/' . $page);
exit;
}
}
// END AI_Exceptions Class
/* End of file AI_Exceptions.php */
/* Location: ./application/libraries/AI_Exceptions.php */
答案 0 :(得分:0)
为$ page添加默认值
function show_404($page = '')
{
$config =& get_config();
header('Location: ' . $config['base_url'] . $config['index_page'] . 'pagenotfound/' . $page);
exit;
}