Changeset 455 for trunk/includes/system.php
- Timestamp:
- Apr 13, 2010, 10:03:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/system.php
r426 r455 1 1 <?php 2 2 3 //include_once('database.php');3 include_once('Database.php'); 4 4 5 5 class Module … … 22 22 var $Config; 23 23 24 function __construct() 25 { 26 $this->Database = new Database(); 27 $this->Config = array(); 28 } 29 24 30 function Init() 25 31 { 26 32 include('config.php'); 27 33 $this->Config = $Config; 28 $this->Database = new mysqli($this->Config['Database']['Host'], $this->Config['Database']['User'], $this->Config['Database']['Password'], $this->Config['Database']['Database']); 29 $this->Database->query('SET NAMES '.$this->Config['Database']['Charset']); 34 $this->Database->HostName = $this->Config['Database']['Host']; 35 $this->Database->UserName = $this->Config['Database']['User']; 36 $this->Database->Password = $this->Config['Database']['Password']; 37 $this->Database->Schema = $this->Config['Database']['Database']; 38 $this->Database->Charset = $this->Config['Database']['Charset']; 39 $this->Database->ShowSQLQuery = $this->Config['Web']['ShowSQLQuery']; 40 $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError']; 41 $this->Database->open(); 30 42 } 31 43
Note:
See TracChangeset
for help on using the changeset viewer.