plugin('MagikeToTypecho'); /** 初始化一个db */ if (Typecho_Db_Adapter_Mysql::isAvailable()) { $magikeDb = new Typecho_Db('Mysql', $dbConfig->prefix); } else { $magikeDb = new Typecho_Db('Pdo_Mysql', $dbConfig->prefix); } /** 只读即可 */ $magikeDb->addServer(array ( 'host' => $dbConfig->host, 'user' => $dbConfig->user, 'password' => $dbConfig->password, 'charset' => 'utf8', 'port' => $dbConfig->port, 'database' => $dbConfig->database ), Typecho_Db::READ); $rows = $magikeDb->fetchAll($magikeDb->select()->from('table.statics')); $static = array(); foreach ($rows as $row) { $static[$row['static_name']] = $row['static_value']; } } catch (Typecho_Db_Exception $e) { $success = false; } include 'header.php'; include 'menu.php'; ?>

重新设置你的信息.', Typecho_Common::url('options-plugin.php?config=MagikeToTypecho', $options->adminUrl)); ?>