mirror of
https://git.beihong.wang/wangbeihong/blog-source.git
synced 2026-04-23 09:13:03 +08:00
35 lines
874 B
PHP
35 lines
874 B
PHP
<?php
|
|
// site root path
|
|
define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
|
|
|
|
// plugin directory (relative path)
|
|
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
|
|
|
|
// theme directory (relative path)
|
|
define('__TYPECHO_THEME_DIR__', '/usr/themes');
|
|
|
|
// admin directory (relative path)
|
|
define('__TYPECHO_ADMIN_DIR__', '/admin/');
|
|
|
|
// register autoload
|
|
require_once __TYPECHO_ROOT_DIR__ . '/var/Typecho/Common.php';
|
|
|
|
//define('__TYPECHO_DEBUG__', true);
|
|
// init
|
|
\Typecho\Common::init();
|
|
|
|
// config db
|
|
$db = new \Typecho\Db('Pdo_Mysql', 'typecho_');
|
|
$db->addServer(array (
|
|
'host' => 'localhost',
|
|
'port' => 3306,
|
|
'user' => 'www_beihong_wang',
|
|
'password' => 'K71bT81AbbFJXad9',
|
|
'charset' => 'utf8mb4',
|
|
'database' => 'www_beihong_wang',
|
|
'engine' => 'InnoDB',
|
|
'sslCa' => NULL,
|
|
'sslVerify' => false,
|
|
), \Typecho\Db::READ | \Typecho\Db::WRITE);
|
|
\Typecho\Db::set($db);
|