查看完整版本: 讓 Apache 也能跑 .asp 的副檔名程式


lancer 2012-2-2 23:53

讓 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:<br><br>For web servers using PHP as apache module:<div><span style="line-height: 20px;">編輯 /etc/httpd/conf.d/php.conf<br></span>加入 .html .htm 的辨識[quote]<br>AddType application/x-httpd-php .html .htm[/quote]<br><br>In case you wish to do the ASP mimick:<br>For PHP as module:<span style="line-height: 20px; ">編輯 /etc/httpd/conf.d/php.conf<br></span>加入 .asp 的辨識<br>[quote]<br>AddType application/x-httpd-php .asp[/quote]<br><br>依照自己的需求加...可以寫在同一行...這樣就可以跑 .asp 的程式了...其實骨子裡還是php的語法...^_^
頁: [1]
查看完整版本: 讓 Apache 也能跑 .asp 的副檔名程式