Le 2025-03-20 21:24, Mike Wright a écrit :
On 3/20/25 10:02, François Patte wrote:
Bonjour,

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 tried many things:

.htaccess with

AddHandler application/x-httpd-php .htm .html
AddType application/x-httpd-php .html

Or modify some lines in /etc/httpd/conf.d/php.conf (FilesMatch, etc.)

Nothing had any success...

I run f40 with httpd and php from the distro.

Thanks for any help.

Bonjour François,

I've never seen or used php where .html is assigned to the php
handler. Is there any particular reason you want/need to use the .html
extension on php?

If you use .php as the file extension does it render as you expect?

Merci.

It is just lazyness... I want to add php includes (like menu...) into html files and I don't want to have to rename all files for this purpose...

I can see on the web people able to have this feature working, but, as far as I can see, they all use other distro, so I am wondering if there is some hiden config in fedora...

Regards.

--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)6 7892 5822
http://www.math-info.univ-paris5.fr/~patte
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to