[thelist] Force same PHP include several times on a page
matt at camadro.com
Fri Apr 25 08:16:27 CDT 2008
Stefan Schwarzer wrote:
> Hi there,
> it seems PHP5 is handling a file include differently than PHP4. I just
> migrated, and in one of my apps, I have an include for a specific PHP
> file (which loads a couple of complex SQL query builds) several times
> on the same page. I guess it's not very efficient; instead it would be
> wiser to build a function instead. But.... don't want to touch the
> code for the moment.
> Now, with PHP4, it loads the include only once. But ignores the other
> Anything I can do about?
> Thanks for any hints!
You probably should check out include_once()
More information about the thelist