note 63266 added to function.include

From: Date: Fri, 17 Mar 2006 18:14:26 +0000
Subject: note 63266 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-105997@lists.php.net to get a copy of this message
Slightly modification to the above example to allow the included file to access the global scope. <? function get_include_contents($filename) { extract($GLOBALS); if (is_file($filename)) { ob_start(); include $filename; $contents = ob_get_contents(); ob_end_clean(); return $contents; } return false; } ?> ---- Server IP: 216.194.113.175 Probable Submitter: 66.126.28.162 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.include.php Edit -- http://master.php.net/note/edit/63266 Del: integrated -- http://master.php.net/note/delete/63266/integrated Del: useless -- http://master.php.net/note/delete/63266/useless Del: bad code -- http://master.php.net/note/delete/63266/bad+code Del: spam -- http://master.php.net/note/delete/63266/spam Del: non-english -- http://master.php.net/note/delete/63266/non-english Del: in docs -- http://master.php.net/note/delete/63266/in+docs Del: other reasons-- http://master.php.net/note/delete/63266 Reject -- http://master.php.net/note/reject/63266 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105997) next »