更新时间:2022-02-01 22:35:41
尝试一下. 使用以下任何一种方法找到您的php.ini文件.
Try this. Find your php.ini file using any of these methods.
<?php phpinfo(); ?>
<?php echo php_ini_loaded_file(); ?>
-或/bin/bash进入容器并运行以下命令之一
-- OR /bin/bash into your container and run one of these commands
php --ini
php -i | grep 'php.ini'
find / -name php.ini
在以下几行中取消注释(删除;);
Uncomment (remove the ;) from the following lines
extension=pdo.so
extension=pdo_mysql.so
extension=pdo_sqlite.so
extension=mysql.so
保存,退出并运行
service apache2 restart