How can PHP be used to open and display HTML files?
To open and display HTML files using PHP, you can use the `file_get_contents()` function to read the contents of the HTML file and then `echo` the contents to display it on the webpage.
<?php
$html_file = 'example.html'; // specify the HTML file to open
if (file_exists($html_file)) {
$html_content = file_get_contents($html_file); // read the contents of the HTML file
echo $html_content; // display the HTML content on the webpage
} else {
echo 'HTML file not found';
}
?>