本文整理汇总了PHP中kernel::console_output方法的典型用法代码示例。如果您正苦于以下问题:PHP kernel::console_output方法的具体用法?PHP kernel::console_output怎么用?PHP kernel::console_output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kernel
的用法示例。
在下文中一共展示了kernel::console_output方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
function __construct()
{
set_time_limit(0);
cachemgr::init(false);
cacheobject::init(false);
kernel::$console_output = true;
set_error_handler(array(&$this, 'error_handle'));
if (file_exists(ROOT_DIR . '/config/config.php')) {
require ROOT_DIR . '/config/config.php';
$this->status['config'] = ROOT_DIR . '/config/config.php';
} else {
$this->status['config'] = 'false';
}
include APP_DIR . '/base/defined.php';
//为shell设置BASE_URL
if (!defined('BASE_URL')) {
if ($shell_base_url = app::get('base')->getConf('shell_base_url')) {
define('BASE_URL', $shell_base_url);
} else {
trigger_error('please login backend first!', E_USER_NOTICE);
}
}
date_default_timezone_set(defined('DEFAULT_TIMEZONE') ? 'Etc/GMT' . (DEFAULT_TIMEZONE >= 0 ? DEFAULT_TIMEZONE * -1 : '+' . DEFAULT_TIMEZONE * -1) : 'UTC');
$this->buildin_commander = new base_shell_buildin($this);
}
示例2:
function __construct()
{
set_time_limit(0);
cachemgr::init(false);
kernel::$console_output = true;
if (file_exists(ROOT_DIR . '/config/config.php')) {
require ROOT_DIR . '/config/config.php';
$this->status['config'] = ROOT_DIR . '/config/config.php';
} else {
$this->status['config'] = 'false';
}
include APP_DIR . '/base/defined.php';
date_default_timezone_set(defined('DEFAULT_TIMEZONE') ? 'Etc/GMT' . (DEFAULT_TIMEZONE >= 0 ? DEFAULT_TIMEZONE * -1 : '+' . DEFAULT_TIMEZONE * -1) : 'UTC');
$this->buildin_commander = new base_shell_buildin($this);
}
示例3: header
function __construct()
{
header('Content-type: text/plain;charset=utf-8');
ignore_user_abort(false);
ob_implicit_flush(1);
ini_set('implicit_flush', true);
set_error_handler(array(&$this, 'error_handle'));
chdir('data');
kernel::$console_output = true;
while (ob_get_level()) {
ob_end_flush();
}
echo str_repeat("", 1024);
//$this->buildin_commander = new base_shell_buildin($this);
parent::__construct();
}
示例4: maintenance_theme_files
public function maintenance_theme_files($theme_dir = '')
{
if (!$theme_dir) {
return;
}
set_time_limit(0);
cachemgr::init(false);
header('Content-type: text/html;charset=utf-8');
ignore_user_abort(false);
ob_implicit_flush(1);
ini_set('implicit_flush', true);
kernel::$console_output = true;
while (ob_get_level()) {
ob_end_flush();
}
echo str_repeat("", 1024);
echo '<pre>';
echo '>update themes' . "\n";
if ($theme_dir == WAP_THEME_DIR) {
$dir = new DirectoryIterator($theme_dir);
foreach ($dir as $file) {
$filename = $file->getFilename();
if ($filename[0] == '.') {
continue;
} else {
$this->update_theme_widgets($filename);
}
}
} else {
$this->update_theme_widgets($theme_dir);
}
echo 'ok.</pre>';
}
示例5: index
function index()
{
$this->_init_keyboard_setting();
$desktop_user = kernel::single('desktop_user');
$menus = $desktop_user->get_work_menu();
$user_id = $this->user->get_id();
$set_config = $desktop_user->get_conf('fav_menus', $fav_menus);
//默认显示5个workground
$workground_count = app::get('desktop')->getConf('workground.count') ? app::get('desktop')->getConf('workground.count') - 1 : 5;
if (!$set_config) {
$i = 0;
foreach ((array) $menus['workground'] as $key => $value) {
//if($i++>$workground_count) break;
$fav_menus[] = $key;
}
}
$obj = kernel::service('desktop_index_seo');
if (is_object($obj) && method_exists($obj, 'title')) {
$title = $obj->title();
} else {
$title = app::get('desktop')->_('管理后台');
}
if (is_object($obj) && method_exists($obj, 'title_desc')) {
$title_desc = $obj->title_desc();
} else {
$title_desc = 'Powered By ShopEx';
}
/*
检查本地是否有更新,并触发更新
应用场景:在打补丁包或升级包的时候
TODO:之后考虑在线安装的情况
*/
$deploy = kernel::single('base_xml')->xml2array(file_get_contents(ROOT_DIR . '/config/deploy.xml'), 'base_deploy');
$local_has_update = false;
if (!($product_version = app::get('base')->getConf('product_version'))) {
$local_has_update = true;
app::get('base')->setConf('product_version', $deploy['product_version']);
} elseif (version_compare($product_version, $deploy['product_version'], '!=')) {
$local_has_update = true;
app::get('base')->setConf('product_version', $deploy['product_version']);
}
if ($local_has_update) {
$shell_handle = kernel::single('base_shell_loader');
kernel::$console_output = false;
$shell_handle->exec_command('update');
}
$this->pagedata['title'] = $title;
$this->pagedata['title_desc'] = $title_desc;
$this->pagedata['session_id'] = kernel::single('base_session')->sess_id();
$this->pagedata['uname'] = $this->user->get_login_name();
$this->pagedata['param_id'] = $user_id;
$this->pagedata['menus'] = $menus;
$this->pagedata['fav_menus'] = (array) $fav_menus;
$this->pagedata['shop_base'] = kernel::base_url(1);
$this->pagedata['shopadmin_dir'] = $_SERVER['REQUEST_URI'];
$desktop_user->get_conf('shortcuts_menus', $shortcuts_menus);
$this->pagedata['shortcuts_menus'] = (array) $shortcuts_menus;
$desktop_menu = array();
foreach (kernel::servicelist('desktop_menu') as $service) {
$array = $service->function_menu();
$desktop_menu = is_array($array) ? array_merge($desktop_menu, $array) : array_merge($desktop_menu, array($array));
}
// 桌面内容替换埋点
foreach (kernel::servicelist('desktop_content') as $services) {
if (is_object($services)) {
if (method_exists($services, 'changeContent')) {
$services->changeContent(app::get('desktop'));
$services->changeContent($desktop_menu);
}
}
}
$this->pagedata['desktop_menu'] = count($desktop_menu) ? '<span>' . join('</span>|<span>', $desktop_menu) . '</span>' : '';
list($this->pagedata['theme_scripts'], $this->pagedata['theme_css']) = desktop_application_theme::get_files($this->user->get_theme());
$this->Certi = base_certificate::get('certificate_id');
$confirmkey = $this->setEncode($this->pagedata['session_id'], $this->Certi);
$this->pagedata['certificate_url'] = "http://key-service.shopex.cn/index.php?sess_id=" . urlencode($this->pagedata['session_id']) . "&certi_id=" . urlencode($this->Certi) . "&version=ecstore&confirmkey=" . urlencode($confirmkey) . "&_key_=do";
$this->display('index.html');
}
示例6: define
<?php
ob_implicit_flush(1);
require __DIR__ . '/../../bootstrap/start.php';
kernel::$console_output = true;
cacheobject::init(false);
// 时区设置
//$timezone = config::get('app.timezone', 8);
//date_default_timezone_set('Etc/GMT'.($timezone>=0?($timezone*-1):'+'.($timezone*-1)));
if (!defined('BASE_URL')) {
if ($shell_base_url = app::get('base')->getConf('shell_base_url')) {
define('BASE_URL', $shell_base_url);
} else {
echo 'Please install ecstore first, and login to the backend ';
}
}