public static function addTipInfo($msg, $type = self::TIP_INFO_TYPE_INFO)
{
if (Cml::$debug) {
switch ($type) {
case self::TIP_INFO_TYPE_INFO:
self::$tipInfo[] = $msg;
break;
case self::TIP_INFO_TYPE_INCLUDE_LIB:
self::$includeLib[] = $msg;
break;
case self::TIP_INFO_TYPE_SQL:
self::$sql[] = $msg;
break;
case self::TIP_INFO_TYPE_INCLUDE_FILE:
self::$includeFile[] = str_replace('\\', '/', str_replace([Cml::getApplicationDir('secure_src'), CML_PATH], ['{secure_src}', '{cmlphp_src}'], $msg));
break;
}
}
}
Debug::addTipInfo ( string $msg, integer $type = self::TIP_INFO_TYPE_INFO, string $color = '' ) : void |
/** * require 引入文件 * * @param string $file 要引入的文件 * @param array $args 要释放的变量 * * @return mixed */ public static function requireFile($file, $args = []) { empty($args) || extract($args, EXTR_PREFIX_SAME, "xxx"); Cml::$debug && Debug::addTipInfo($file, Debug::TIP_INFO_TYPE_INCLUDE_FILE); return require $file; }