Re: Retrieve output from HTML or PHP file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have used output buffering[1] in the past to do what you are describing.

<snip>

# HTML to be written:
ob_start(); // Begin output buffering:
require($_SERVER['DOCUMENT_ROOT'].$path.'/ '.$name_of_template.$name_of_template_ext); $message = ob_get_contents(); // Put contents of the above require into $message.
ob_end_clean(); // Clean the output buffer.

</snip>

Probably better ways to do above, but maybe that will help you in some way.

Oh, you may also want to look into the eval() function[2].

[1] http://us2.php.net/manual/en/function.ob-start.php
[2] http://us2.php.net/manual/en/function.eval.php

Cheers, Micky
--
BCC for Privacy: http://www.cs.rutgers.edu/~watrous/bcc-for-privacy.html
My del.icio.us: http://del.icio.us/mhulse

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux