【发布时间】:2021-01-10 06:33:21
【问题描述】:
我运行了 php artisan 命令,它返回了这个。
PS C:\Users\15715\OneDrive\Desktop\laravel-tutorial\links> php artisan migrate
Illuminate\Database\QueryException
could not find driver (SQL: select * from information_schema.tables where table_schema = links_development and table_name = migrations and table_type = 'BASE TABLE')
at C:\Users\15715\OneDrive\Desktop\laravel-tutorial\links\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671
667▕ // If an exception occurs when attempting to run a query, we'll format the error
668▕ // message to include the bindings with SQL, which will make this exception a 669▕ // lot more helpful to the developer instead of just the database's errors.
670▕ catch (Exception $e) {
➜ 671▕ throw new QueryException(
672▕ $query, $this->prepareBindings($bindings), $e
673▕ );
674▕ }
675▕
1 C:\Users\15715\OneDrive\Desktop\laravel-tutorial\links\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("could not find driver")
2 C:\Users\15715\OneDrive\Desktop\laravel-tutorial\links\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDO::__construct()
当我检查 PDO 时,它会在 PDO 上显示这一点。不确定这是否有帮助。
【问题讨论】:
-
你可以使用xampp并将laravel指向xampp
标签: php laravel pdo laravel-artisan