1 连接sqlit数据库出现错误(当使用sqlite_open() 连接数据库时出现以下错误)
Warning: sqlite_open() [function.sqlite-open]: file is encrypted or is not a database
官方解读:sqlite_open()只支持sqlite2版本,暂不支持sqlite3版本;若连接sqlite3必须用sqlite_pdo去连接:
(费了九牛二虎之力才找到答案,没差点晕倒!)
$dbh = new PDO(‘sqlite:whl.db’);
if ($dbh){
echo ‘OK’;
}else{
echo ‘Err’;
}
$res = $dbh->query(‘insert into info(info_name) values(“whlll”);’);
{
if(!$res) die(“bad”);
}
echo “good”;
echo “
“;
2:如何解决Php(adodb)输出Mysql中数据乱码问题!
请参考http://hi.baidu.com/yueti/blog/item/edc46acb4f394f1bbe09e6f6<wbr>.html 这边说明