[Phpwm] Trying to include one file in another

Simon Ferré simon.ferre at glowinternet.net
Sun Dec 11 14:24:20 GMT 2005


Jono

The links script requires a database connection script, which sets a
variable to the table name (amongst other things).

What I have done for now is: after the require statement I checked the table
name variable to see if it was empty, and if so tried the include again with
a more complete path.  I probably could get away with just one include
command with the full path /links/config.php instead of just ./config.php.

Anyway, it worked (but now I've added a require to a page counter include
script and it's all gone tits up again.

Well, must get the debugging head on to see what's up...

Simon

-----Original Message-----
From: phpwm-bounces at mailman.lug.org.uk
[mailto:phpwm-bounces at mailman.lug.org.uk]On Behalf Of Jono Bacon
Sent: 10 December 2005 11:41
To: phpwm at mailman.lug.org.uk
Subject: Re: [Phpwm] Trying to include one file in another


On 12/9/05, Simon Ferré <simon.ferre at glowinternet.net> wrote:
>
> 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.

Looks fine here. Did you manage to fix it?

Also, you may find it useful in future posts to include snippets of
PHP code - this makes it easier for us to determine what the problem
is. :)

  Jono

_______________________________________________
Phpwm mailing list
Phpwm at mailman.lug.org.uk
http://mailman.lug.org.uk/mailman/listinfo/phpwm




More information about the Phpwm mailing list