Fatal error: Uncaught Error: Class 'SQLite3' not found 解决方案 PHP7.4

<?php
    class MyDB extends SQLite3
    {
       function __construct()
       {
          $this->open('F:\26.db');
       }
    }
    $db = new MyDB();
    if(!$db){
       echo $db->lastErrorMsg();
    } else {
       echo "Opened database successfully\n";
    }
?>

 

I am here in PHP7.4 version, tried the online recommendation, extension = sqlite3 removed the previous title, but it still does not work.

Refer to the instructions on PHP's official website, you will understand, as long as you change the PATH, the problem is solved perfectly

 

Guess you like

Origin www.cnblogs.com/life512/p/12708746.html