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

Home » Imported messages » comp.lang.php » Including PHP scripts on same server
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Including PHP scripts on same server [message #171906 is a reply to message #171900] Thu, 20 January 2011 19:38 Go to previous messageGo to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Jan 20, 5:25 pm, jwcarlton <jwcarl...@gmail.com> wrote:
> On Jan 20, 7:02 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>
>> On Jan 20, 6:18 am, jwcarlton <jwcarl...@gmail.com> wrote:> I currently have several functions scripted on one page.
>
>> No you don't. A "page" (or more correctly a document) is what someone
>> sees on a browser. It is not the same as a php file.
>
>> One php file may generate many html pages or many php files may
>> generate only 1 page.
>
>> Do not confuse the 2.
>
> I'm really not sure how I would have said this correctly. What I'm
> referring to aren't really functions, either; they're sections of a
> single page that is created (executed?) via PHP.
>
> For example, consider the Yahoo.com homepage. What if each section
> (the navigation, the main news in the middle, "Trending Now" to the
> right, the Google ad, "Marketplace" below, and "Popular Travel" beside
> of it) were each including a separate PHP file to create them? Would
> this be slower, or the same, as compared to them being coded in a
> single file?

Why does it matter. If you're that concerned about speed of execution,
why are you using php in the first place? You should code your site in
C.

And even if you had a single php file, think of all those newline
characters that have to be read in. Better put everytihing on a single
line.

Oh and don't have variable names that are longer than necessary, it
all increases the time the file takes to be read, so just use single
letters for all variable names.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ElephantMark - a new simple tool for PHP documentation
Next Topic: hack
Goto Forum:
  

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

Current Time: Thu Nov 28 10:54:21 GMT 2024

Total time taken to generate the page: 0.04706 seconds