Apache 2 PHP mit HTML parsen

Post Reply
Message
Author
cc
Posts: 191
Joined: 18. Apr 2003 18:04

Apache 2 PHP mit HTML parsen

#1 Post by cc »

hi

bei mir läuft Apache2 auf SUSE 9.1

wie kann ich Apache2 umkonfigurieren,
damit PHP files mit HTML geparst werden ?

zum Beispiel:

Code: Select all

<html>
<body>

<?php echo "Test,"; ?>

</body>
</html>

erwin_

#2 Post by erwin_ »

Hi,

in der php config von apache2
(die sollte hier liegen: /etc/apache2/conf/modules.d/70_mod_php.conf )
muss für jeden mit php zu parsenden Dateityp eine entsprechende Zeile vorhanden sein:
[code]
# Set it to handle the files
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .html
AddType application/x-httpd-php-source .phps
</IfModule>
[/code]

bei SUSE sollte das zumindest so ähnlich gehen.

Gruß
erwin

cc
Posts: 191
Joined: 18. Apr 2003 18:04

#3 Post by cc »

danke erwin

es hat geklappt

Post Reply