ADJ網路實驗室
打印

[介紹] 讓 Apache 也能跑 .asp 的副檔名程式

讓 Apache 也能跑 .asp 的副檔名程式

By default most web servers across the internet are configured to treat as PHP files only files that end with .php. In case you need to have your HTML files parsed as PHP (e.g .html) or even if you want to take it further and make your PHP files look like ASP, you can do the following:

For web servers using PHP as apache module:
編輯 /etc/httpd/conf.d/php.conf
加入 .html .htm 的辨識
引用:

AddType application/x-httpd-php .html .htm


In case you wish to do the ASP mimick:
For PHP as module:編輯 /etc/httpd/conf.d/php.conf
加入 .asp 的辨識
引用:

AddType application/x-httpd-php .asp


依照自己的需求加...可以寫在同一行...這樣就可以跑 .asp 的程式了...其實骨子裡還是php的語法...^_^





TOP

ARTERY.cn