note 82902 deleted from function.include by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 00:56:57 +0000 |
| Subject: | note 82902 deleted from function.include by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155452@lists.php.net to get a copy of this message | ||
Note Submitter: etadpole23_2 at yahoo dot com
----
It aggravated me trying to get an absolute URL include from another one of my sites; then it
occurred to me to check the phpinfo().
Under the "PHP Core" section; look for these values:
allow_url_fopen
allow_url_include
Turns out, both of mine are turned off. If you are stuck, try this snippet that {oasis1 (at)
geocities (d@t) com} wrote earlier:
<?php
$times = substr_count($_SERVER['PHP_SELF'],"/");
$rootaccess = "";
$i = 1;
while ($i < $times) {
$rootaccess .= "../";
$i++;
}
include ($rootaccess."path_to_script");
?>
Thanks a ton Oasis!