• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

php or html?

Status
Not open for further replies.

Sain Cai

Beautiful Daddy
NLC
Basic question, should I make a site using basic php or html? I can easily use the portal for phpbb2 (smartor) to create a workable site and wanted to know if this would be preferable to making one in html.

Would load times be faster, lower bandwidth consumption, etc?
 
If your website can be designed with HTML, my suggestion is to avoid PHP as it's taking time to execute it on the server as mentioned by dmm.

But the thing is, if you are working on a big project, you'd probably want PHP to handle it. Sometimes it becomes easier than HTML.
 
i ALWAYS use PHP. I do that cause I do NOT want to make the same header, nav, footer or anything like that more than once. Im sure you will NOT notice a difference in rendering PHP or HTML for load times. if it is simple PHP, it will not take and noticeable server power.
 
The site would be using the same header/footer, but I use the same template for all pages, just editing the content area.

I will stick with html for now, and would be easy to convert if needed.

Thank you
 
http://patriotsfanzone.co.cc

I would keep everything the same, but change the left and right areas easily. The right area will probably have the same content (shops, ticket info, etc) while the left would be the main content. All I am doing is placing the content in the area to the left.
 
no, what i am saying is that you may be using the same header and footer for each page, but, you will have to put the header and footer on each page if you are doing html. if you were to at least use PHP includes, you could make one header file and one footer file and then make changes to that one file to effect the whole site. so, it would be good to consider using it for that part at least.
 
Yah, thats what the portal for phpbb does. I am able to create the header and footer just like the forum would, and then just create the php page by copying and renaming the portal.php page (altering what template gets called), and then creating the .tpl file for the main content area. I actually had that set up for the old Patriots Fanzone site I had a couple years ago.

I was just unsure if there was a difference in speed, server load, bandwidth consumption, etc if I went with html over php or vice versa.
 
i see, yeah, like i said, not a noticeable difference for something like that. i just prefer PHP myself so i am not limited if i want to expand later down the road.
 
@ibrightdev , have a read:

http://en.wikipedia.org/wiki/Server_Side_Includes

So you know now that you can have a common header and footer for all pages both in html and in php .

never seen that for just html. ive only heard of ssi for php, asp and other server side languages. that is interesting. im gonna have to look into that some more. surprised i never heard of that though considering ive been doing this for 10 years. thanks for the info. good to learn new things. :)

@Carl, i agree. i just personally like to use my own mini php framework for all sites at this point to just speed up the process of development. but yeah, you are correct in what you said.
 
never seen that for just html. ive only heard of ssi for php, asp and other server side languages. that is interesting. im gonna have to look into that some more. surprised i never heard of that though considering ive been doing this for 10 years. thanks for the info. good to learn new things. :)

@Carl, i agree. i just personally like to use my own mini php framework for all sites at this point to just speed up the process of development. but yeah, you are correct in what you said.

You've never heard of it? Wow, man. I remember using it back in 2001 when I first joined here and didn't even know what PHP was. Then I graduated to making a template and putting in the content area
Code:
<?php include("$page"); ?>
And serving it up as index.php?page=news.html

After I realized how bad that was for security (Gimme a break, I was 12!!!) I learned me some proper PHP, albeit OOPless.

Imagine: index.php?page=/_vti_pvt/administrators.pwd

Oops.


Now I use 99% XHTML/CSS, but include the header and footer with php.
 
Last edited:
Basic question, should I make a site using basic php or html? I can easily use the portal for phpbb2 (smartor) to create a workable site and wanted to know if this would be preferable to making one in html.

Would load times be faster, lower bandwidth consumption, etc?

Sounds to me like you don't know what PHP or HTML really are..

PHP = Pre Hypertext (aka html) Processor

ie, PHP processes everything and then creates the output for the HTML.

So short answer: use HTML, or use both. You can't just use PHP to make a webpage unless it's plaintext.
 
I'd keep the bulk of it html for simplicity, but switch into PHP for sections that need it such as including the headers or any interactive content.

Code:
<?php
include "/includes/header.php";
?>

<h1>Heading 1 here. </h1>
<p> content yay. </p>

<?php
include "/includes/footer.php";
?>

Something like that. I use this very structure with a few changes to compensate for the MySQL loading and unloading to display all of the content, and also to load my menu sidebar.
 
Last edited:
I now remembered why I use the php style. When I have several pages and I need to change the header, I would have to go into all the pages to change. PHP I wont need to do that
 
Status
Not open for further replies.
Back
Top