cache['func'][$name])) { return true; } $file = IA_ROOT . '/framework/function/' . $name . '.func.php'; if (file_exists($file)) { include $file; $this->cache['func'][$name] = true; return true; } else { trigger_error('Invalid Helper Function /framework/function/' . $name . '.func.php', E_USER_ERROR); return false; } } // 加载指定的model,并在$cache用cache['model']的方式标识好是否加载成功 function model($name) { global $_W; if (isset($this->cache['model'][$name])) { return true; } $file = IA_ROOT . '/framework/model/' . $name . '.mod.php'; if (file_exists($file)) { include $file; $this->cache['model'][$name] = true; return true; } else { trigger_error('Invalid Model /framework/model/' . $name . '.mod.php', E_USER_ERROR); return false; } } // 加载指定的类,并在$cache用cache['class']的方式标识好是否加载成功 function classs($name) { global $_W; if (isset($this->cache['class'][$name])) { return true; } $file = IA_ROOT . '/framework/class/' . $name . '.class.php'; if (file_exists($file)) { include $file; $this->cache['class'][$name] = true; return true; } else { trigger_error('Invalid Class /framework/class/' . $name . '.class.php', E_USER_ERROR); return false; } } function web($name) { global $_W; if (isset($this->cache['web'][$name])) { return true; } $file = IA_ROOT . '/web/common/' . $name . '.func.php'; if (file_exists($file)) { include $file; $this->cache['web'][$name] = true; return true; } else { trigger_error('Invalid Web Helper /web/common/' . $name . '.func.php', E_USER_ERROR); return false; } } // 加载指定的前端app函数,并在$cache用cache['app']的方式标识好是否加载成功 function app($name) { global $_W; if (isset($this->cache['app'][$name])) { return true; } $file = IA_ROOT . '/app/common/' . $name . '.func.php'; if (file_exists($file)) { include $file; $this->cache['app'][$name] = true; return true; } else { trigger_error('Invalid App Function /app/common/' . $name . '.func.php', E_USER_ERROR); return false; } } }