Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

77 users online



PHP bandwidth

PHP bandwidth

Currently viewing this thread: 1 (0 members and 1 guests)


Page 2 out of 2
TheClincher

TheClincher

Lost in Berkeley, CA
Status: Offline!
Originally posted by phpmonkey:
Originally posted by TheClincher:
Quote:

2. would it save bandwidth to place all my php functions in a seperate .php file and just include that file on the pages that need it?

yes, and it wuold also be convenient, kind of like including a css

Uhm. No? You would *not* save bandwidth by using includes.

so... it's not like css Lips Are Sealed still convenient tho

___________________

There is no theory of evolution. Just a list of creatures Chuck Norris has allowed to live.

Last edited by TheClincher, July 23rd, 2006 05:17 AM (Edited 1 times)

stewis

stewis

Neverside Newbie
Status: Offline!

No matter how you do it (unless you compress the output) you wont be saving any bandwidth by moving any of your code to php. also by putting your html code into php files and echoing out the html unless you are actualy doing anything there may be pretty pointless and may use server resources that you may not actualy need...

even just <?php "hello world" ?> would consume more resources than just the server sending the html file taht contains "hello world".

In short if you dont need it dont use it Smile

___________________

Current status: Taken
Somethings Coming: 07/07/07
**stewis lubs Sarah Smile**

Dan

Dan

Ex-Ninja
Status: Offline!
Originally posted by stewis:

No matter how you do it (unless you compress the output) you wont be saving any bandwidth by moving any of your code to php. also by putting your html code into php files and echoing out the html unless you are actualy doing anything there may be pretty pointless and may use server resources that you may not actualy need...

even just <?php "hello world" ?> would consume more resources than just the server sending the html file taht contains "hello world".

In short if you dont need it dont use it Smile

What he said basically, I'm too lazy to type it all out when it's already then.

As somebody asked me to do the other day, they wanted their homepage in PHP, because they wanted to use the PHP Date function. But instead of just say doing a simple

PHP:

<?php
echo date("l");
?>

They wanted me to echo everything out through PHP (All normal HTML) It almost made me smile!

Never the less, saving bandwidth with simple PHP isn't going to happen, so be smart and use normal HTML if you can!

**Shuts up now as this answer has now been answered like 10 time already Whistle**

___________________

Dan

Rad

Rad

thinking of something witty to put here
Status: Offline!

Bandwidth counts as data transferred from the server to another client. If you have one-hundred different scripts will unique ways to output the same data, the end result will use up the same bandwidth because that's all that the client sees.

The difference between these scripts is the amount of load they put on the computer. If you have more than one way to do the same thing, it's generally a good idea to use the one which consumes the least resources. You can check the performance of a function by using a PHP debugger, inline benchmark script, or an external benchmarking tool.

(I realize the question has been answered ten times already, but I don't think any of the answers actually contained a real explanation.)

Page 2 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0172 seconds.