Re: Re: include() problems
| From: | Gustave Bernier | Date: | Thu, 02 Oct 2003 15:07:37 +0000 |
| Subject: | Re: Re: include() problems | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164759@lists.php.net to get a copy of this message | ||
Thanks for answering.
I'm trying to include that file because in my index page because it has many functions I need to use in other pages... I'm on ADDR.com servers and I can't set "allow_url_fopen" to 1 (it sucks!).
In ssi.php functions are called by accessing this address: http://mydomain.com/forums/ssi.php?a=active
So how can I possibly include that page (ssi.php?a=active) on any of my pages???
From: "Dennis Sterzenbach" <lists@darknoise.de> Reply-To: "Dennis Sterzenbach" <lists@darknoise.de> To: php-general@lists.php.net Subject: [PHP] Re: include() problems Date: Thu, 2 Oct 2003 15:34:26 +0200 "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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ MSN Messenger: instale grátis e converse com seus amigos. http://messenger.msn.com.br