note 82902 added to function.include

From: Date: Wed, 30 Apr 2008 23:18:51 +0000
Subject: note 82902 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-138952@lists.php.net to get a copy of this message
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! ---- Server IP: 209.41.74.194 Probable Submitter: 24.149.43.167 ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- https://master.php.net/note/edit/82902 Del: integrated -- https://master.php.net/note/delete/82902/integrated Del: useless -- https://master.php.net/note/delete/82902/useless Del: bad code -- https://master.php.net/note/delete/82902/bad+code Del: spam -- https://master.php.net/note/delete/82902/spam Del: non-english -- https://master.php.net/note/delete/82902/non-english Del: in docs -- https://master.php.net/note/delete/82902/in+docs Del: other reasons-- https://master.php.net/note/delete/82902 Reject -- https://master.php.net/note/reject/82902 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#138952) next »