note 15951 added to language.variables.predefined
| From: | dgarrett at acm dot org | Date: | Wed, 10 Oct 2001 02:07:32 +0000 |
| Subject: | note 15951 added to language.variables.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18760@lists.php.net to get a copy of this message | ||
This should allow you to find the
document base when running as an apache
module. However, is the 'require'
statement really secure? I'd hate for
someone to find a way to 'require'
/etc/passwd, or some such.
$docPath = substr($PATH_TRANSLATED, 0, strlen($PATH_TRANSLATED) - strlen($PHP_SELF));
require($docPath.'/lib/library.php');
--
http://www.php.net/manual/en/language.variables.predefined.php
http://master.php.net/manage/user-notes.php?action=edit+15951
http://master.php.net/manage/user-notes.php?action=delete+15951
http://master.php.net/manage/user-notes.php?action=reject+15951