try
{
    $res = $db->exec($sql);
    if ($res === FALSE)
    {
        print_r($db->errorInfo());
        die();
    }
}
catch(PDOException $e)
{
    die($e-开发者_如何学编程>getCode().':'.$e->getMessage());
}
catch(Exception $e)
{
    die($e->getCode().':'.$e->getMessage());
}    
No error info, and neither does it get caught as an exception. Yet $res is FALSE and no data gets inserted.
Array
(
    [0] => 
)
But when I echo $sql and enter that query in SQLiteManager, it works inserting the data.
I used sqlite only with Python, but I had to commit insert/update statements there... Maybe that's the case here too? http://docs.php.net/manual/en/pdo.commit.php
Ensure the directory where you store file is writable.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论