Re: include (or require) doesn't seem to work
| From: | Torsten Roehr | Date: | Wed, 12 May 2004 19:56:24 +0000 |
| Subject: | Re: include (or require) doesn't seem to work | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186043@lists.php.net to get a copy of this message | ||
"Daniel Barbar" <daniel_barbar@yahoo.com> wrote in message
news:20040512093547.7846.qmail@pb1.pair.com...
> Thanks Torsten! Using the file-system relative path made it work (I had
> tried only with the absolute path, which ddidn't work). However, I checked
> again and I did have 'allow_url_fopen = On' in /etc/php.ini. I'll take a
> closer look later and report the problem if I find it. Thanks again,
>
> Daniel
Using the absolute path works as well - but you have to use the full LOCAL
file path, e.g. /htdocs/www/your-domain etc.
You can get this value from $_SERVER['DOCUMENT_ROOT'].
Regards, Torsten
>
> "Torsten Roehr" <roehr@zilleon.com> wrote in message
> news:20040511195319.16739.qmail@pb1.pair.com...
> > > Try including it as a local file:
> > > require_once library.php'; // if it is in the same directory as the
file
> > you
> >
> > Forgot a quote here, sorry:
> > require_once 'library.php';
> >
> > Torsten