Hey guys, I'm hosting on a linux so my only option for Server Scripting is a combination of PHP + MySQL. However, I'm not quite sure if it would be better to give all my pages a .shtml or a .php extension. If you guys could tell me which one is better and why I'd be really thankful. Also, would you know which one would be the easiest to update/upgrade in the future?
Name them whatever you want and tell the server to parse it with the php engine. That said, you should probably use .php
Welcome to DP, Richie As exam said, name them anything you want. For PHP scripts ".php" is the normal extension. However, if you want them to look like static pages, name them ".html" and make Apache parse that extension as PHP.
Well, my pages display primarily static content, however i think .php would be better to use as the site gets more advanced so i guess I'll go with that. But should I use .php or .php3? and whats with .php4?
ok, just one last question: are there any other extensions that allow PHP+MySQL besides .php and .shtml? thanks
Seeing as no-one else would help this poor chap out.. If you don't have a .htaccess file already in the root of your web directory create one and add the following line. AddType application/x-httpd-php .php .html .htm You will then be able to use php tags in any file with the extensions .html and .htm.
Some people of lyrics sites name their files like: u2.music, then as mark 79 suggests just tell the server to parse them through php.
thanks mark! I'm gonna do that. I think ill use the .ssp extension. lol if someone reads this and thinks it would be better if i used another etension please tell me. By the way: i altered the .htaccess and it worked!
you can use what ever u like .php, .phtml, .phtml, .inc, .tpl etc..... even .programmer but normally people use .php for php pages coz its easy to remmember for visitors.