PHP报错的问题,请大家帮忙看一看,是属于什么原因?非常感谢(下面是错误的提示和代码)
Warning: Missing argument 3 for APP::adapter(), called in
Warning: Missing argument 2 for APP::load_file(), called in 
Warning: Missing argument 2 for request(), called in
 
static public function load_file($file, $mod)
{
static $loaded = array();
if (isset($loaded[$file])) { return NULL;
} if ($mod) { $f = (is_array($file) ? $file : APP::format_rote($file));
$dirs = $f[1];
$file = $f[2];
if (!preg_match("/^[a-z_][a-z0-9_]*$/i", $file)) { throw new Exception("Filename error ");
} if (!preg_match("/^[a-z_][a-z0-9_\/,]*$/i", $dirs) && $dirs) { throw new Exception("dir error ");
} if (($mod == "tpl") && !$dirs) { $dirs = $GLOBALS["tpl"][RUN_CONTROLLER] . "/";
} $d = array("ctl" => APP_PATH . "/controller/" . $dirs . $file . ".ctl.php", "mod" => APP_PATH . "/models/" . $dirs . $file . ".mod.php", "tpl" => TPL_DIR . "/" . $dirs . $file . ".tpl.php", "func" => FUNCTION_PATH . "/" . $dirs . $file . ".fun.php", "cls" => LIB_PATH . "/class/" . $dirs . $file . ".cls.php");
$file = $d[$mod];
} if (!is_file($file)) { throw new Exception("dir_file error ");
} $loaded[$file] = true;
return include_once $file;
} static public function adapter($name, $type, $new)
{
$path = $name . "/" . $type . "_" . $name;
if ($new) { return APP::load_class($path, "adp");
} else { $file_path = LIB_PATH . "/class/" . $path . ".adp.php";
APP::load_file($file_path);
} }function request($key, $default_val)
{
return _gprscf("R", $key, $default_val);
}

解决方案 »

  1.   

    APP::load_file() 定义了 2 个参数,但调用时只给了一个参数(APP::load_file($file_path);)
    其他雷同,但因为代码不全,恕不一一指出
      

  2.   

    参数数量不匹配Warning: Missing argument 2 for APP::load_file(), called in 定义是2个参数
    static public function load_file($file, $mod)调用是1个
    APP::load_file($file_path);其他两个警告都是同样的问题。