2016-04-27 7 views
1

gestern spielte ich mit der http.conf-Datei meines Apache-Servers, damit es php in HTML kompiliert, es funktionierte gut und alle Dateien öffneten sich jedoch ohne Probleme heute ist es Dateien, anstatt sie zu öffnen Download html, nur die pHP-Datei arbeitet zur ZeitHTML-Datei wird heruntergeladen, anstatt auf Apache-Server zu öffnen (AMPPS)

meine conf ist wie folgt hält:

<IfModule mime_module> 
# 
# TypesConfig points to the file containing the list of mappings from 
# filename extension to MIME-type. 
# 
TypesConfig conf/mime.types 

# 
# AddType allows you to add to or override the MIME configuration 
# file specified in TypesConfig for specific file types. 
# 
#AddType application/x-gzip .tgz 
# 
# AddEncoding allows you to have certain browsers uncompress 
# information on the fly. Note: Not all browsers support this. 
# 
#AddEncoding x-compress .Z 
#AddEncoding x-gzip .gz .tgz 
# 
# If the AddEncoding directives above are commented-out, then you 
# probably should define those extensions to indicate media types: 
# 
AddType application/x-compress .Z 
AddType application/x-gzip .gz .tgz 
AddType application/x-httpd-php .php 
RemoveHandler .html .htm 
AddType application/x-httpd-php5 .html .htm 
AddType application/x-tar .tgz 
AddType image/x-icon .ico 
AddType application/vnd.wap.wmlc .wmlc 
AddType application/x-httpd-php .phtml .pwml .php5 .php4 .php3 .php2 .php .inc 
AddType text/vnd.wap.wml .wml 
AddType text/vnd.wap.wmlscript .wmls 
AddType text/vnd.wap.wmlscriptc .wmlsc 
AddType image/vnd.wap.wbmp .wbmp 

# 
# AddHandler allows you to map certain file extensions to "handlers": 
# actions unrelated to filetype. These can be either built into the server 
# or added with the Action directive (see below) 
# 
# To use CGI scripts outside of ScriptAliased directories: 
# (You will also need to add "ExecCGI" to the "Options" directive.) 
# 
AddHandler cgi-script .cgi .pl 

# For type maps (negotiated resources): 
#AddHandler type-map var 

# 
# Filters allow you to process content before it is sent to the client. 
# 
# To parse .shtml files for server-side includes (SSI): 
# (You will also need to add "Includes" to the "Options" directive.) 
# 
AddType text/html .shtml 
AddOutputFilter INCLUDES .shtml 

Ps der "RemoveHandler .html .htm" Linie ist eine der Linie, die ich gestern hinzugefügt habe so dass es php in html kompiliert, habe ich versucht, es zu entfernen, aber immer noch das gleiche.

+1

Sie neu starten müssen (neu laden) Apache nach einem Wechsel so. – YvesLeBorg

+0

Ich fand das Problem, das // AddType-Anwendung/x-httpd-php .html .htm \\ fehlte und ja, danke für die Erinnerung an mich für jedes Mal neu starten, ich mache eine Änderung ich nicht –

+0

neu gestartet wurde froh, dass du auf bist und gehst. Wenn Sie eine Chance haben, schreiben Sie das als Antwort auf und akzeptieren Sie es. Hilft anderen. – YvesLeBorg

Antwort

0

fand ich das Problem aus, das // AddType application/x-httpd-php .html .htm // fehlte