[PHP] PHP Built-in web server で .html 拡張子のファイルでもスクリプトを実行させる設定
router.php を利用する。
Web Server がある環境であれば `.htaccess` ファイルに設定を加える等の方法で扱えます。
“`apache:.htaccess
AddType application/x-httpd-php html
“`
ビルトインサーバでお気楽に確認したい場合は、`router.php` を起動オプションに追加するとできたような…。
> – [PHP: ビルトインウェブサーバー – Manual](https://www.php.net/manual/ja/features.commandline.webserver.php)
こちらを参考にさせて頂きました。
ありがとうございます。
> – [phpのビルトインウェブサーバーで拡張子.htmlをphpとして動作させる – Qiita](https://qiita.com/mach3/items/e13aed93cdd5b0c2915a)
“`php:router.php
Edit Configurations` で `Use router script` に `router.php` を指定します。