Пример #1
0
<?php

/**
 * Ihush Console
 *
 * @author     James.Huang <*****@*****.**>
 * @license    http://www.apache.org/licenses/LICENSE-2.0
 * @version    $Id$
 */
require_once '../etc/app.config.php';
require_once 'Hush/Util.php';
////////////////////////////////////////////////////////////////////////////////////////////////////
// Constants definition
define('__MYSQL_HOST', '127.0.0.1');
define('__MYSQL_PORT', '3306');
define('__MYSQL_USER', 'root');
define('__MYSQL_NAME', 'passwd');
define('__MYSQL_IMPORT_TOOL', 'mysql');
define('__MYSQL_DUMPER_TOOL', 'mysqldump');
define('__MYSQL_IMPORT_COMMAND', __MYSQL_IMPORT_TOOL . ' {PARAMS} < {SQLFILE}');
define('__MYSQL_DUMPER_COMMAND', __MYSQL_DUMPER_TOOL . ' {PARAMS} --add-drop-database > {SQLFILE}');
////////////////////////////////////////////////////////////////////////////////////////////////////
// Main process
try {
    require_once 'Weibo/Cli.php';
    $cli = new Weibo_Cli();
    $cli->run();
} catch (Exception $e) {
    Hush_Util::trace($e);
    exit;
}
Пример #2
0
 public function __init()
 {
     parent::__init();
     $this->init_sql = realpath(__ROOT . '/doc/install/mysql.sql');
 }
Пример #3
0
 public function __init()
 {
     parent::__init();
     $this->_printHeader();
     $this->db_config = new MysqlConfig();
 }