拡張子が html である場合に、PHP コードを記述しても実行されない場合があります。.htaccess を利用することで、html ファイルを PHP として実行することができます。下記のコードは .htaccess に記述するコードです。
|
1 2 |
AddType application/x-httpd-php .html |
または
|
1 2 |
AddHandler application/x-httpd-php .html |

