Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

debugging includes

Status
Not open for further replies.

merlinx

Programmer
Sep 20, 2002
170
DE
I've Banging my brains in the last weeks with my project, after an error which did not occure loacaly but did when uploaded.

found out that was do to case sensitivty on a character.

So long story short;

since then I put a variable at the top of my MAIN script,

$OnloadList = array($Variable1=>FALSE,$Class1=>FALSE);

include './myVariables.php';
// equals : <?php $Variable1=TRUE; and th rest.... ?>
include_once './myClass.php';
// equals : <?php $Class1=TRUE; class my_cls {-code- } ?>

so when debugging I check my array for anything FALSE.

Hope this helps anyone ....
 
thanks for sharing.

you can also check the get_included_files() function which returns an array or, if the file is needed then you should use require so that an error is thrown and execution is stopped when the file does not get included.

 
Cool,
didn't know that one yet. I just read over it, even though for my purposes the other way is better for this project. when reading file names from a data base, I can add it's name to the varible & then try to include it. After which I can generate a message about any missing file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top