Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

WebProNews:
An Alternative to Include?
Feb 23, 2005 @ 13:41:45

On WebProNews.com today, there's a new short article posted from Michael Medeiros giving a simple solution for PHP includes.

Now, what, you might ask, needs to be solved about PHP includes? Well, for people just starting out, the concept of making a PHP include might be a little tricky to grasp, so he offers his own solution - an iframe with the source being the PHP that you want to include.

Granted, though there are other flexibility options made availible with this solution, I just don't think that using an iframe to replace something that's as simple as an include is a good idea. One, it's more rendering for the browser to have to do, and two, it's also yet another request that the client has to make to fetch a page. With a normal include, the content is just shoved out the door with the rest of the data...

Thanks to PHP Magazine for the pointer...

tagged:

Link:


Trending Topics: