Error: file is encrypted or is not a database

后端 未结 7 1001
栀梦
栀梦 2020-11-30 08:39

I used PHP to create a database with a table. I did it in the following way:



        
相关标签:
7条回答
  • 2020-11-30 09:19

    I faced the same problem, use pdo instead of sqlite_open()

    this link is very helpful and here is my code snippet, works perfectly, hope it helps

    $dir = 'sqlite:YourPath/DBName.db';
    $dbh  = new PDO($dir) or die("cannot open the database");
    $query =  "SELECT * from dummy_table";
    foreach ($dbh->query($query) as $row)
    {
        echo $row[0];
    }
    
    0 讨论(0)
提交回复
热议问题