include_once not working.
Posted: Thu Sep 11, 2008 1:01 am
I have some php scripts to work with. The main script (main.php) includes some another php script (say script1.php), and this script1.php in turn includes yet another script (say scrip11.php). The second include (of script11.php) is inside a function func1 written in
script1.php file. The script1.php gets included correctly inside main.php, but the second include_once statement (in file script1.php) is not working.
I tried to check this several ways, the options I used are listed below:
1) check using function_exists, called on the function from script11.php
2) check putting simple echo statements in all the scripts.
3) check using include_once return value. --> if(!@include_once('script11.php')) die("failed");
But none of the above could point me to the error, except they only confirmed that include_once is not working there.
Moreover, even the statements after include_once are also not executing.
Please help me out of this trouble.
Thanks in advance!
I tried to check this several ways, the options I used are listed below:
1) check using function_exists, called on the function from script11.php
2) check putting simple echo statements in all the scripts.
3) check using include_once return value. --> if(!@include_once('script11.php')) die("failed");
But none of the above could point me to the error, except they only confirmed that include_once is not working there.
Moreover, even the statements after include_once are also not executing.
Please help me out of this trouble.
Thanks in advance!