FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How many PHP calls is too many for one webpage?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How many PHP calls is too many for one webpage? [message #173494 is a reply to message #173487] Fri, 15 April 2011 20:06 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Evolution wrote:
> On Apr 15, 12:09 pm, Evolution <cryptoz...@gmail.com> wrote:
>> On my homepage, I have five 'require_once' calls and within one of
>> those, two more 'require_once' calls. I want to increase this from
>> those seven to about twelve. This seems like no problem but I'm
>> wondering what the most anyone else has tried without any costly
>> degradation of load time.
>> Thanks a bunch.
>
> To be more specific, what I want to do is include other php files to
> make up my sidebar based on which page I'm calling from. For example,
> I don't want to include a link to our schedule of speakers if that is
> the page that I am on.

why not?


> Would a case statement be the best way to
> handle this?
>
sure - make a generic 'sidebar' file and selectively omit bits of it
depending on a paraetr passed to your 'draw_the_sidebar($for_this_page)
function
> p.s. if not obvious, I'm a php newbie.

with respect, a coding newbie. That's basic coding approach stuff. In
any procedural language.

first of all you learn inline code.

You discover you are writing the same bit over and over.

You invent the macro or the subroutine (function)

You discover you are writing subroutines that are almost the same as
each other.

You invent the subroutine whose behaviour varies according to parameters.

You discover lots of these subroutines can be used by different programs

You invent the library, included or linked or run time linked...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I serialize zend_http_request object?
Next Topic: Why no Text after image 1?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Feb 17 00:25:21 GMT 2025

Total time taken to generate the page: 0.15295 seconds