<?php
if ($db = sqlite_open('config.db', 0666, $sqliteerror)) { echo "connect ok"; }
else { die($sqliteerror); }
?>
下到你的开发板,会报错file is encrypted or is not a database in
google 下php5.3.6需要用pdo来支持sqlite3,现在改用下面的代码:
<?php
$db = new PDO('sqlite:config.db');
if ($db){
echo 'connect ok';
}else{
echo 'connect bad';
}
?>
这样子就没有问题了