#23766 [NEW]: include/require that return
From: ericn at ionws dot com
Operating system: Linux
PHP version: 4.3.1
PHP Bug Type: Feature/Change Request
Bug description: include/require that return
Currently (obviously), include(_once) and require(_once) process the php
file that they are called with and output of that file is sent. However,
it would be useful to store an included file's output in a variable
instead of sending it to the user. For example:
include.php:
<?php echo "<b>Bold Text</b>"; ?>
include("include.php");
would send <b>Bold Text</b> to the user, however, the hypothetical
function (or construct) includeto would store all of include.php's output
in a variable. So:
$output = includeto("include.php");
$output would contain "<b>Bold Text</b>"
If there is already a way to accomplish this, I apologise, but could not
find one.
--
Edit bug report at http://bugs.php.net/?id=23766&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23766&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23766&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23766&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23766&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23766&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23766&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23766&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23766&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23766&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23766&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23766&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23766&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23766&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23766&r=gnused
Thread (2 messages)
- ericn at ionws dot com