Jump to content

HTML or PHP?


ramee001

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.