Re: include() problems

From: Date: Thu, 02 Oct 2003 13:34:26 +0000
Subject: Re: include() problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164738@lists.php.net to get a copy of this message
"Gustave Bernier" <gustave_bernier@hotmail.com> wrote in message news:BAY9-F264bnN3sYyCw0000164cb@hotmail.com... > Hi everyone, > > I'm new to PHP and I'm trying to use the include function but with no > success... My server's ini file is set as (allow_url_fopen, 0) so I'm > having some trouble to pass different values for the php file I'm calling. > The address is: http://mydomain.com/forums/ssi.php?a=active > > The code I'm trying now is: > $_GET['a'] = 'active'; > include('forums/ssi.php'); > > When I use this code I have no error, ssi.php is loaded but nothing is done > (I believe the "a" value isn't passed to ssi.php) and the page where the > include is stops loading just after the include(). You don't pass the value to that file, you simply tell the preprocessor of PHP to copy the contents of forums/ssi.php file into the source code before executing the script. You do NOT call the ssi.php by that! As you are stating you want to call http://mydomain.com/forums/ssi.php?a=active why are you including the file in there? The statement about allow_url_fopen, 0 setting controls access to remote-resources, so if you are allowed to do something like fopen("http://...") or include("http://.."). Thus it doesn't have anything to do with your include. -- Dennis Sterzenbach www.darknoise.de

« previous php.general (#164738) next »