note 85352 added to function.file-get-contents

From: Date: Wed, 27 Aug 2008 04:19:39 +0000
Subject: note 85352 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-143856@lists.php.net to get a copy of this message
In response to EOD (07-Aug-2008 08:34) - this function is not designed to parse php files. It only returns the full contents of any file into a string. If you're looking to parse a php file and output the full results into a string, you could use the ob_ functions wrapped around an 'include' instead: <?php ob_start(); include($filename); $return_str = ob_get_contents(); ob_end_clean(); ?> ---- Server IP: 208.69.120.35 Probable Submitter: 24.107.184.98 ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- https://master.php.net/note/edit/85352 Del: integrated -- https://master.php.net/note/delete/85352/integrated Del: useless -- https://master.php.net/note/delete/85352/useless Del: bad code -- https://master.php.net/note/delete/85352/bad+code Del: spam -- https://master.php.net/note/delete/85352/spam Del: non-english -- https://master.php.net/note/delete/85352/non-english Del: in docs -- https://master.php.net/note/delete/85352/in+docs Del: other reasons-- https://master.php.net/note/delete/85352 Reject -- https://master.php.net/note/reject/85352 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143856) next »