ramee001 Posted April 23, 2009 Share Posted April 23, 2009 Been doing web work for years, and can't believe I've never thought about this more. Why would a web developer use html pages instead of php pages(or asp)? It seems to me you can do everything in a php page that can be done in an html page (or htm, shtml), but php has many more possiblites - cookie management, serveral variables, force downlaods, user management, thousancds of scrpits, etc. Am I missing something here? Do html pages have capalbites that cannot be accomplished with php? I'm considering this becuase we have a new site and I was considering changing all the pages to php (from shtml as they are now). Any suggestions greatly approectiated. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/ Share on other sites More sharing options...
Maq Posted April 23, 2009 Share Posted April 23, 2009 Am I missing something here? Do html pages have capalbites that cannot be accomplished with php? No, in fact PHP is pre-processed to be rendered as HTML to the browser. There is no question transitioning from static HTML to PHP is a good choice, especially if you want to add anything dynamic to your sites. Any suggestions greatly approectiated. If you're new to PHP then I would suggest reading tutorials from www.php.net. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/#findComment-817357 Share on other sites More sharing options...
jackpf Posted April 23, 2009 Share Posted April 23, 2009 Well, PHP files are slower for the server to "serve" as they've obviously got to be parsed. But obviously that's no problem at all if you're actually using the php. The reason a lot of people don't use php is probably because they don't know how to. It took me a while to learn. Before that I just used static html. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/#findComment-817387 Share on other sites More sharing options...
SuperBlue Posted April 23, 2009 Share Posted April 23, 2009 Slower yes. Will you notice? No! Not unless the server is heavily loaded, with many concurrent visitors. PHP is not a replacement of HTML, its a server-sided language, used to deliver text/html. But it can also be used to deliver xml, pdf, images. etc. So it would indeed be better to use PHP, rather then HTML alone! To be a "web developer" i also think you would need to know some server-sided language. Just using HTML/CSS would just make you a designer, and almost anyone can "design" webpages. You would need to be really skilled with CSS to get real work, but thats entirely another story. Shtml takes use of server-sided includes, such as perl scripts. So if you are comfortable writing those, then PHP won't take long to pick up. The official reference is often all you need. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/#findComment-817394 Share on other sites More sharing options...
JonnoTheDev Posted April 23, 2009 Share Posted April 23, 2009 Remember this though. Just because you see a .html extension on a url doesn't mean that it is not a php file or anything else. Mod Rewrite can transform URLs. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/#findComment-817521 Share on other sites More sharing options...
Axeia Posted April 23, 2009 Share Posted April 23, 2009 Quite simple to understand to me. HTML got a zillion wyiwyg editors, every host supports it and learning just enough to create a page is done within a day. PHP is a programming language, takes a bit more effort than a day, in fact I'm quite sure that everyone on these boards is still learning something new and useful every now and then. They really don't compare, a html page is like writing a word document, where as php is more like writing an application. Different uses, Different users, Different purposes, Different writers. Quote Link to comment https://forums.phpfreaks.com/topic/155358-html-or-php/#findComment-817835 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.