Executing a php.file twice from a parent php.file

I need to execute a php.file twice that has functions defined from a parent php.file. Something like this:

  • My code

include(php.file);
*

  • More my code

include(php.file);
*

  • More my code

The problem with include or require is the second execution tries to declare functions that were defined the first time around, a fatal error. The “include” php file is huge (10,000+ lines) and not modifiable. I pass information to the “include” file by:

$_POST[‘var1’] = “asdf”;

My question is how to accomplish this? Any help would be most appreciated. Thanks.

Include_once comes to mind but without knowing more I can’t suggest a better approach.

have a read of this, not sure if it’s what you need for this particular issue.
Reflection
Red :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service