Re: Re: include help please

From: Date: Thu, 31 Jul 2003 22:46:56 +0000
Subject: Re: Re: include help please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-157837@lists.php.net to get a copy of this message
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.

« previous php.general (#157837) next »