On Tuesday 22 July 2003 01:43 pm, David Nicholson wrote:
> Hello,
>
> This is a reply to an e-mail that you wrote on Tue, 22 Jul 2003 at
> 18:37, lines prefixed by '>' were originally written by you.
>
> > But how can I instead capture the output of the include to
>
> variable
>
> > and mail
> > it, something like
> > $msg = include('myscript.php?foo=bar")
>
> Use output buffering...
>
> ob_start() // see http://uk2.php.net/ob_start
>
> include("youfile.php");
>
> $mailthis = ob_get_contents() // see
> http://uk2.php.net/manual/en/function.ob-get-contents.php
>
> ob_end_clean() // see
> http://uk2.php.net/manual/en/function.ob-end-clean.php

Thanks. 
Will the same method works for a dynamically generated image using php? 
Suppose that myscript.php output JPEG instead of HTML.

RDB


>
> HTH
>
> David

-- 
-------------------------------------------------
/"\  ASCII Ribbon Campaign against HTML
\ /  email and proprietary format
 X   attachments.
/ \
-------------------------------------------------
Have you been used by Microsoft today?
Choose your life. Choose freedom.
Choose LINUX.
-------------------------------------------------


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to