本文整理汇总了PHP中FB::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP FB::getInstance方法的具体用法?PHP FB::getInstance怎么用?PHP FB::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FB
的用法示例。
在下文中一共展示了FB::getInstance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __autoload
<?php
include __SITE_PATH . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'controller_base.class.php';
include __SITE_PATH . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'registry.class.php';
include __SITE_PATH . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'router.class.php';
include __SITE_PATH . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'template.class.php';
function __autoload($class_name)
{
$filename = strtolower($class_name) . '.class.php';
$file = __SITE_PATH . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . $filename;
if (file_exists($file) == false) {
return false;
}
include $file;
}
$registry = new registry();
$conf_file = __SITE_PATH . DIRECTORY_SEPARATOR . 'conf' . DIRECTORY_SEPARATOR . 'config.php';
if (file_exists($conf_file)) {
include $conf_file;
}
$registry->config = $config;
$registry->dbinfo = $db;
$registry->fb = $fb;
$registry->db = DB::getInstance($registry);
$registry->fb = FB::getInstance($registry);