Re: Re: include help please
| From: | LoonySalmon | Date: | Thu, 31 Jul 2003 22:50:17 +0000 |
| Subject: | Re: Re: include help please | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157838@lists.php.net to get a copy of this message | ||
thanks jeff harris, that is exactly what my problem was,
now it works
good night all
thank a million
"Jeff Harris" <jharris@rallycentral.us> wrote in message
news:Pine.LNX.4.44.0307311533500.19423-100000@www.rallycentral.us...
> On Aug 1, 2003, "LoonySalmon" claimed that:
>
> |and btw, this is my code now:
> |
> |<?php
> |require 'files.inc.php';
> |
> |if (isset($page)) {
> |include $$_GET['page'];
> |} else {
> |$page = $main;
> |include $page;
> |}
> |?>
> --
>
> Is $main being set inside a function?
> http://www.php.net/language.variables.scope
> Also, for future compatability, you should probably change the 3rd line to
> "if (isset($_GET['page'])) {" That will also help incase files.inc.php is
> inadvertently setting varables incorrectly.
>
> Jeff
> --
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc |
> gpg --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
> Responses to this message should conform to RFC 1855.
>
>