public function toSqlite()
{
$this->_clear_runtime();
if (strtolower(C("DB_TYPE")) == 'mysql') {
$this->mysql();
$this->_moveTable("catalog");
$this->_moveTable("item");
$this->_moveTable("item_member");
$this->_moveTable("page");
$this->_moveTable("page_history");
$this->_moveTable("template");
$this->_moveTable("user");
$this->_moveTable("user_token");
$db_config = array('DB_TYPE' => 'Sqlite', 'DB_NAME' => 'Sqlite/showdoc.db.php');
$array = M("item")->db(2, $db_config)->select();
if ($array) {
echo "ok";
} else {
echo 'fail';
}
} else {
echo "mysql not found";
}
$this->_clear_runtime();
}