|
-
Aug 31st, 2006, 08:40 PM
#1
Thread Starter
Member
Include
Hi Friends
I was wondering whether including the html part of a program as an external file is a good idea. I saw it working neetly in phpbb, but will it takes more time for the compiler to do so? Is it a burden on the compiler?; as far as a heavy traffic site is concerned.
-
Aug 31st, 2006, 11:53 PM
#2
Re: Include
It depends how you do it. As a general rule of thumb raw file system access is quicker than a database query, yet most high traffic database-driven sites will execute several queries per request anyway. The expense is not big.
Also, PHP doesn't have a compiler. It is an interpreted language. That having been said, the interpreted code is cached to a certain extent.
-
Sep 1st, 2006, 12:55 AM
#3
Re: Include
 Originally Posted by abhilashdas
Hi Friends
I was wondering whether including the html part of a program as an external file is a good idea. I saw it working neetly in phpbb, but will it takes more time for the compiler to do so? Is it a burden on the compiler?; as far as a heavy traffic site is concerned. 
Templates are a good idea and while they have a slight impact on performance, their benefits far outweigh any performance issues. You can write your templates in PHP with the help of their alternate syntax, or you can use a templating system such as Smarty.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|