您好我有一個PHP webapp正在使用的sqlite2數據庫,我希望Yii webapp能夠訪問它。此刻,我複製的數據庫文件到本地服務器,我已經改變了的config/main.php到:與Yii webapp共享sqlite2數據庫
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/thedatabase.db',
),
當我運行GII模型生成我得到:
CDbException
CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 26 file is encrypted or is not a database. The SQL statement executed was: SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence'
BTW我我能夠使用
Exporting sqlite2 database to SQL
雖然我希望數據庫留爲sqlite2數據庫到數據庫轉換爲SQL,以便Yii的應用程序可以訪問最新的用戶INF O操作。