Re: Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/lib/php')

From: Date: Wed, 18 Feb 2004 14:27:35 +0000
Subject: Re: Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/lib/php')
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-178105@lists.php.net to get a copy of this message
Andrew Judge wrote:
Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/lib/php') in /Library/WebServer/html/services.php on line 65 line 65 if the $page variable as below <snip>
<? include "$page"; ?> <snip>
The page is called with an href page.php?page=content.php with the content.php page in the web root (both pages are in the web root).
I'd put money on you having register_globals off - which is good. Replace your include with... <? include $_GET['page']; ?> and it should work. Also, please look into the security implications of what you are doing here. I'd also put money on this being a massive great hole in your servers security. -- Stuart

« previous php.general (#178105) next »