2012-09-11, 05:01 AM
2012-09-11, 05:33 AM
Please see: http://docs.mybb.com/Performance.html
2012-09-11, 10:02 AM
(2012-09-11, 05:33 AM)Nathan Malcolm Wrote: [ -> ]Please see: http://docs.mybb.com/Performance.htmlthanks very much,This is the answer I'm looking for.
(2012-09-11, 05:33 AM)Nathan Malcolm Wrote: [ -> ]Please see: http://docs.mybb.com/Performance.html
I found the below code seems a bug:
/**
*$config['type'] = 'mysqli';
*$config['read']['database'] = 'mybb';
*$config['read']['table_prefix'] = 'mybb_';
*$config['read']['hostname'] = 'localhost_read_address';
*$config['read']['username'] = 'root';
*$config['read']['password'] = '******';
*$config['write']['database'] = 'mybb';
*$config['write']['table_prefix'] = 'mybb_';
*$config['write']['hostname'] = 'localhost_write_address';
*$config['write']['username'] = 'root';
*$config['write']['password'] = '******';
*/
function connect($config)
{
if(array_key_exists('hostname', $config))
{
$connections['read'][] = $config;
}
else
{
if(!array_key_exists('read', $config))
{
foreach($config as $key => $settings)
{
if(is_int($key)) $connections['read'][] = $settings;
}
}
else
{
$connections = $config;
}
}
$this->db_encoding = $config['encoding'];
foreach(array('read', 'write') as $type)
{
//$connections[$type] is also an array
if(!is_array($connections[$type]))
{
break;
}
}
......
}