A simple application for DEMO using Azure App Service with container.
181
Created a simple app, built from PHP/Apache/MySQL that is containerize and place in Azure App Service.
/php-apache-mysql/
├── apache
│ └── demo.apache.conf
├── Dockerfile
└── public_html
└── index.php

<?php
$host = 'mysql';
$user = 'root';
$pass = 'rootpassword';
$conn = new mysqli($host, $user, $pass);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
} else {
echo "Connected to MySQL successfully!";
}
?>
This code attempts to connect to a MySQL database using the mysqli interface from PHP. If successful, it prints a success. If not, it prints a failed message.
Content type
Image
Digest
Size
141.2 MB
Last updated
over 6 years ago
docker pull cenon4dno/php-apache-mysql