Re: Re: [PHP3] require
| From: | Erik Stainsby | Date: | Sat, 10 Jun 2000 05:39:06 +0000 |
| Subject: | Re: Re: [PHP3] require | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1531@lists.php.net to get a copy of this message | ||
Another common technique is:
<? require( $DOCUMENT_ROOT . '/some_path/under_the/docroot.inc' ); ?>
And of course chowning the file/dir out of user-space ...
----- Original Message -----
From: "Richard Lynch" <richard@zend.com>
To: <php-general@lists.php.net>
Sent: Friday, June 09, 2000 2:24 PM
Subject: [PHP-GENERAL] Re: [PHP3] require
> In article <4.3.1.0.20000607085138.00b152a0@mail.f-tech.net>,
> farber@f-tech.net (Paul Farber) wrote:
>
> > Hello again all
> >
> > New issue, using a require() file to 'hide' username and passwords
for db
> > connects.
> >
> > Works fine if the required file is in the same dir, but pathing it
out
> > generates a cannot read file error. I tried full path, relative
path,
> > setting the include path in php.ini, nothing. The directory was
chmod'd
> > 777 as well as the file.
> >
> > What's the secret to requiring a file that needs a path?
>
> Altering the include_path in your php.ini should do it...
>
> Unless SAFE_MODE is restricting your access...
>
> If you can chown the file to nobody, but leave it in your web-tree,
and
> then chmod it 400 that might be sufficient...
> --
> Richard Lynch | If this was worth $$$ to you, buy a
CD
> US Customer Support Director | from one of the artists listed here:
> Zend Technologies USA | http://www.L-I-E.com/artists.htm
> http://www.zend.com | (this has nothing to do with
> Zend,
duh!)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
php-list-admin@lists.php.net
>