本文整理汇总了PHP中main::init方法的典型用法代码示例。如果您正苦于以下问题:PHP main::init方法的具体用法?PHP main::init怎么用?PHP main::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteDomain
public static function deleteDomain()
{
$domain = self::$input['domain'];
if (!is_array($domain)) {
$domain = array($domain);
}
foreach ($domain as $d) {
@unlink(self::file($d));
}
}
public static function file($domain)
{
return self::$cacheDir . $domain . '.json';
}
}
$result = main::init();
?>
<?php
if (in_array($_REQUEST['a'], array('config', 'domain'))) {
?>
<!doctype html>
<html>
<head>
<title>规则配置</title>
<link rel="stylesheet" href="static/reset.css"/>
<script src="static/jquery.min.js"></script>
<script src="static/jquery-ui.js"></script>
<script src="static/jquery.tmpl.min.js"></script>
<script src="static/tip.js"></script>
</head>
示例2: Backup
<?php
/*
Plugin Name: Amazon S3 Backup
Description: Amazon S3 Backup Plugin to create Amazon S3 Full Backup (Files + Database)
Version: 1.0.4
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'libs' . DIRECTORY_SEPARATOR . "main.php";
main::setPluginDir(dirname(__FILE__));
main::setPluginName('amazon-s3-backup');
main::init();
add_action('init', array('main', 'run'));
add_action('admin_print_scripts', array('main', 'include_admins_script'));
示例3: convert
$converted = false;
include ROOT . 'install/include/convert.php';
$main = new convert($converted);
if ($converted) {
$page = end($pages);
$pages = array($page);
}
} else {
include ROOT . 'install/include/main.php';
$main = new main();
}
if (!$page) {
if (!in_array($_GET['page'], $pages)) {
$page = reset($pages);
} else {
$page = $_GET['page'];
}
}
define('INSTALL_PAGE', $page);
define('CONTENT_PATH', 'install/style/content/');
define('IMAGES_PATH', 'install/style/content/images/');
define('JS_PAGES', '["' . implode('", "', array_map('addslashes', $pages)) . '"]');
if ($_GET['page']) {
$main->init();
} else {
include 'include/classes/class.input.php';
tpl::o()->assign('pages', $pages);
tpl::o()->assign('clang', $lng);
tpl::o()->assign('input', input::o());
tpl::o()->display('contents');
}