Req #29416 [Opn->Wfx]: ob_include function
| From: | yohgaki@php.net | Date: | Tue, 06 Aug 2013 08:01:45 +0000 |
| Subject: | Req #29416 [Opn->Wfx]: ob_include function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-180749@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=29416&edit=1
ID: 29416
Updated by: yohgaki@php.net
Reported by: edwin at cheatah dot nl
Summary: ob_include function
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
$message = ob_include ( './tpl/mail.php' );
You should use
$message = file_get_contents();
since it is unrelated to "output".
Previous Comments:
------------------------------------------------------------------------
[2004-07-28 01:30:30] edwin at cheatah dot nl
Description:
------------
I often use something like the following code:
ob_start ();
include './tpl/mail.php';
$message = ob_get_contents ();
ob_end_flush ();
I would very much like to see a function of control stucture like this:
$message = ob_include ( './tpl/mail.php' );
// or
$message = ob_include './tpl/mail.php';
Of course ob_include_once, ob_require and ob_require_once behave similarly.
(Creating a custom function in PHP code is NOT possible, for the function's scope would be
used.)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=29416&edit=1