I have a website that is currently mostly static pages, with only a small percentage actually employing PHP scripting. For the sake of uniformity, and also to account for the possibility that I may be adding some PHP code to the other pages, I went ahead and gave all my pages .php extensions. What I'm assuming will happen is that every page that gets requested will be passed onto the PHP parser, which will then notice that there is no scripting on the page and pass it along to the user. My question is will this have a noticeable impact on the performance/speed of my website. And does this go against good practices. My current website is composed about roughly two dozen pages and I expect moderate amounts of traffic (hopefully!). Thanks Jimmy SCJP,SCWCD
I am dealing with the same issues as you. 24 pages doesn't really seem like a lot to me. And my initial thought on performance is this: If you will eventually have everything PHP enabled anyway, does it matter how it performs now? It can't perform any worse. So I wouldn't worry about it. It may even give you some good inclination as to where some problems may lie in your Web Page without having to deal with a lot of PHP code right off the bat. Not to mention it will help test your Web Server to see if your hosting company is worth a damn. As far as "good practices" I do not know for sure. But I can't imagine it is bad practise to keep some sort of uniformaty to the Web Site. My thoughts anyway...
if i remember correctly, Marc is right about the tag thing. i did the same thing when i set up my servlet site, i let tomcat serve up most of the static pages too(except the first one) i dont think it matters though if there is not a lot of traffic at the site. [ February 22, 2003: Message edited by: Randall Twede ]
thanx for the responses guys. I'm going to leave all the pages as *.php. Marc: At the risk of sounding like I'm advertising, I'm currently using Lunarpages and have to say they are awesome. My account is both PHP and JSP enabled. I'm making the main website mainly rely on PHP and am going to implement several web apps in Servlet/JSP. The website is about 30% done. However I do have one specific question about PHP. How do you concat strings? For example: $var = "one" + " " + "two" This is one of the very few questions I can't seem to answer relying on the net. I'm using a PHP script to auto-mail contact info from an HTML form. Thanks in advance. Still in beta: http://www.aegis-consulting.net/tmp/contact.php