edwagbb commited on
Commit
2c5def5
·
1 Parent(s): 9394345

Create config.inc.php

Browse files
Files changed (1) hide show
  1. config.inc.php +25 -0
config.inc.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // site root path
3
+ define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
4
+
5
+ // plugin directory (relative path)
6
+ define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
7
+
8
+ // theme directory (relative path)
9
+ define('__TYPECHO_THEME_DIR__', '/usr/themes');
10
+
11
+ // admin directory (relative path)
12
+ define('__TYPECHO_ADMIN_DIR__', '/admin/');
13
+
14
+ // register autoload
15
+ require_once __TYPECHO_ROOT_DIR__ . '/var/Typecho/Common.php';
16
+
17
+ // init
18
+ \Typecho\Common::init();
19
+
20
+ // config db
21
+ $db = new \Typecho\Db('SQLite', 'typecho_');
22
+ $db->addServer(array (
23
+ 'file' => '/var/www/html/usr/6532096871d85.db',
24
+ ), \Typecho\Db::READ | \Typecho\Db::WRITE);
25
+ \Typecho\Db::set($db);