Changeset 4325 for trunk/include/common.inc.php
- Timestamp:
- Nov 20, 2009, 3:17:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r4280 r4325 93 93 include(PHPWG_ROOT_PATH . 'include/config_default.inc.php'); 94 94 @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php'); 95 include(PHPWG_ROOT_PATH .'include/dblayer/functions_mysql.inc.php'); 95 96 96 97 if(isset($conf['show_php_errors']) && !empty($conf['show_php_errors'])) … … 105 106 106 107 // Database connection 107 @mysql_connect( $conf['db_host'], $conf['db_user'], $conf['db_password'] ) or my_error( 'mysql_connect', true ); 108 @mysql_select_db( $conf['db_base'] ) or my_error( 'mysql_select_db', true ); 109 110 defined('PWG_CHARSET') and defined('DB_CHARSET') 111 or fatal_error('PWG_CHARSET and/or DB_CHARSET is not defined'); 112 if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) 113 { 114 if (DB_CHARSET!='') 115 { 116 pwg_query('SET NAMES "'.DB_CHARSET.'"'); 117 } 118 } 119 elseif ( strtolower(PWG_CHARSET)!='iso-8859-1' ) 120 { 121 fatal_error('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info()); 122 } 108 $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], 109 $conf['db_password'], $conf['db_base']) 110 or my_error('pwg_db_connect', true); 111 112 pwg_db_check_charset(); 123 113 124 114 load_conf_from_db();
Note: See TracChangeset
for help on using the changeset viewer.