我的代码在开发中正确执行。但在生产时出现以下错误:
Missing Database Connection
Error: A Database connection using "Mysql" was missing or unable to connect. The database server returned this error: Selected driver is not enabled
Error: Mysql driver is NOT enabled
最佳答案
PHP 5.5.x 及更高版本上的 Mysql 扩展已弃用。 在 PHP 7 上,mysql 已被删除。 您应该使用 PDO。如果不能,那么尝试用 mysqli 扩展替换你的 mysql。
关于php - 使用 "Mysql"的数据库连接丢失或无法连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40028327/