On 3/20/25 23:36, Tim via users wrote:
On Thu, 2025-03-20 at 18:02 +0100, François Patte wrote:
I can't get working a php script in an html file: the same file:
<!DOCTYPE html>
<html lang="fr_FR">
<head> <meta charset="utf-8" /> </head>
<body> <h1><?php echo 'toto' ;?></h1>
</body>
</html>
returns "toto" in toto.php and nothing in toto.html
I'm not sure that's a wise idea. Now the server would have to parse every .html file looking for PHP, rather than just the .php files.
+1 Very good point!
Though I do something similar for server side includes, any page with a .shtml suffix, or any .html page with the X bit set is parsed. But not every .html file is parsed, because it doesn't need it.