본문 바로가기

ETC/MVixBox

.html .htm 파일안에서 PHP 사용하기

1. Apache 환경설정 파일을 수정합니다.

~# vi /etc/apache2/httpd.conf

2. 아래위치에 AddType application/x-httpd-php . html .htm .inc 을 추가합니다. [ 약 456라인 ]

...
#<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-source .phps
    AddType application/x-httpd-php . html .htm .inc
#</IfModule>
...

3. Apache 데몬을 재시작 합니다.

~# service apache restart