[Phpwm] Trying to include one file in another

Simon Ferré simon.ferre at glowinternet.net
Fri Dec 9 19:03:30 GMT 2005


Hi all

I am trying to include one page in another, but I get a discrepancy.

The original page is http://www.pdinfo.co.uk/links/index.php and I am
including it in http://www.pdinfo.co.uk/links.php.  As you can see, the
original page works by itself, but once included, it does not connect to the
database and display the correct information.

The index.php has a require statement in it which sets database connection
parameters and the like.  Am I to assume that these require statements will
be confused by the script not being run in the correct directory?

If so, any thoughts on how I can differentiate between loading from
inside/outside the links directory to make sure the require command always
works?

Thanks

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/phpwm/attachments/20051209/4a711c6b/attachment.html


More information about the Phpwm mailing list