Portal Home > Knowledgebase > How To's and more > File Extensions


File Extensions




Well, now that you have mastered basic PHP, you can go on to the fun stuff: why not let people believe you were using the much harder to learn JSP? or even ColdFusion?

Try this.

In any folder, create a .htaccess file with the following contents:

PHP:
--------------------------------------------------------------------------------

AddType application/x-httpd-php .jsp

--------------------------------------------------------------------------------

And voila, from now on you can rename any .php file into .jsp and run it as a PHP file.

This can also be useful if you want to hide PHP for security reasons. 



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
.htaccess tips (Views: 1092)