My file lies in /var/www/spywgc/adm/index.php folder .... and the file i want to include lies in var/www/spywgc/adm/rpt/lib_pivot.php
I want to include lib_pivot.php in index.php..... The lib_pivot.php interns include a file var/www/spywgc/lib_gen file.....
I wrote a syntax of in index.php file... but, it keeps giving me error....
Someone please explain me what to do.
Well it's hard to solve without you telling us the actual error, but this should work
If anything you might have been missing the "/" at the start of the string
include('rpt/lib_pivot.php'); will work, unless there's something I'm misunderstanding.
When you call
include(), and don't begin with a '/', it starts in the directory of the caller script. So if
index.php is in
adm/, then just progress from inside
adm/ further down the path.
If I understand this correctly (it's kind of confusing):
The lib_pivot.php interns include a file var/www/spywgc/lib_gen file
then inside of
include('../../lib_gen.php'); to come up two directories from the
You have no showed the
include() statement that resides on line 1 inside of
lib_pivot.php...thats where you error is comming from