运行我的 php laravel 程序时出错

问题描述 投票:0回答:1
   Illuminate\Database\QueryException 

  could not find driver (Connection: mysql, SQL: select * from `site_settings` order by `created_at` desc limit 1)

  at vendor\laravel\framework\src\Illuminate\Database\Connection.php:829
    825▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e
    826▕                 );
    827▕             }
    828▕
  ➜ 829▕             throw new QueryException(
    830▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    831▕             );
    832▕         }
    833▕     }

  1   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(App\Providers\AppServiceProvider))

  2   vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:65
      PDOException::("could not find driver")

运行我的 Laravel 应用程序

php laravel apache pdo xampp
1个回答
0
投票

您需要从 php.ini 文件中取消注释“pdo_mysql”扩展, 只需删除下一行开头的 ";" 即可:

;extension=pdo_mysql.so
© www.soinside.com 2019 - 2024. All rights reserved.