In this code must be an error due to empty arguments in the mysqli_connect
function. But browser display different error. As I know mysqli_connect
function installed by default. Where is the problem or my mistake? How I can fix it?
Dockerfile
FROM php:fpm
# Update system core
RUN apt update -y && apt upgrade -y
# Start PHP-FPM
CMD ["php-fpm"]
index.php
<?php mysqli_connect('', '', '', '', '', ''); ?>
Error in browser:
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/index.php:3 Stack trace: #0 {main} thrown in /var/www/index.php on line 3