php 5.3版本使用success()方法报错

#1 小双

提示错误如下

Strict Standards: Declaration of general::error() should be compatible  with spController::error($msg, $url = '')

2014-07-21 17:25:37

#2 jake

入口加一行

error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));

2014-07-21 17:49:54

#3 小双

加在index.php文件头上,不过还是提示一样的错误,网址是:wuhanzhongyi.com
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
ob_start();       
// 网站主体模块程序入口文件
define('IN_SHOPZC', true);

// 载入配置与定义文件
require("config.php");

// 当前模块附加的配置
$spConfig['controller_path'] = APP_PATH.'/modules/'.basename(__FILE__,".php");
............


麻烦老大了,帮忙看下什么原因?

2014-07-21 18:58:11

#4 jake

小双 发表于 2014-7-21 18:58
加在index.php文件头上,不过还是提示一样的错误,网址是:wuhanzhongyi.com
帮你Google一下,应该是这样的情况吧 http://www.cnblogs.com/firstdream/archive/2012/03/30/2424939.html

2014-07-21 21:06:10

#5 小双

谢谢老大,赋个默认值!正解!OK了!

public function success($msg= NULL, $url= NULL)
{
  $this->msg = $msg;
  $this->url = $url;
  $this->display("index/success.html");
  exit();
}

2014-07-22 01:48:54