Page 1 of 1

problem while include a file

Posted: Mon Sep 12, 2005 1:01 am
by eshban
I want to include a file 'one.php' in my project. But in file 'one.php' one more file 'b.php' in already included which is actually the header. I just want one.php file to be included in my project not 'b.php' file. What can i do

kindly help me in this regard.

Posted: Mon Sep 12, 2005 1:06 am
by feyd
several options come to mind:
  1. create a copy of one.php that doesn't have b.php included
  2. rewrite all files including one.php to include b.php where needed, removing it from one.php.
  3. add logic into one.php that tells it whether or not to add b.php. This can be done via a variable or analyzing the callstack.