note 51066 deleted from function.eval by nlopess
| From: | nlopess@php.net | Date: | Fri, 18 Mar 2005 19:53:10 +0000 |
| Subject: | note 51066 deleted from function.eval by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-86649@lists.php.net to get a copy of this message | ||
Note Submitter: Larry Elliott (larrbear81 at yahoo dot com)
----
Another way to dynamically load the ouput of a php file into a string:
<span class="default">function get_php_output ($filename) {
<span class="keyword">ob_start</span>();
<span class="keyword">include</span>($filename);
$eval_str = <span class="keyword">ob_get_contents</span>();
<span class="keyword">ob_end_clean</span>();
<span class="keyword">return</span> $eval_str;
}</span>