|
修改system/application/config/database.php
1. 修改 $db['default']['dbprefix'] = "pre_";
2。添加
$db['default']['swap_pre'] = "#__";
以上是对于ci的,要是khn的话;
1. config/database.php 中加入
'table_prefix' => 'pre_',
'swap_pre' => '#__',
2. system/libraries/Database.php
{
if ($sql == '') return FALSE;
替换为
{
if ($sql == '') return FALSE;
if ( ($this->config['table_prefix'] != '' AND $this->config['swap_pre'] != '')
AND ($this->config['table_prefix'] != $this->config['swap_pre']) )
{
$sql = preg_replace("/(\W)".$this->config['swap_pre']."(\S+?)/",
"\\1".$this->config['table_prefix']."\\2", $sql);
}
本来发在khnfans上面了,那边人气太若,转到这边来了
[ 本帖最后由 tboqi 于 2009-1-12 09:20 编辑 ] |
|