On Fri, June 2, 2006 12:27 pm, Rodrigo de Oliveira Costa wrote:
> Can I do the below to an URL, like retrieving the output of a site and
> store it on a variable?
http://php.net/'); ?>
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Peter Lauri wrote:
> As I read in the documentation it only takes the content of the file. If
> there is a script in the file I want that to be fun first. A file like
> this:
>
> --
> HTLM content
>
> HTML content
> --
>
> I want the result from my function to be
>
> --
>
I have used output buffering[1] in the past to do what you are
describing.
# 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
---Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Monday, January 30, 2006 11:49 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Retrieve output from HTML or PHP file
Hi Peter,
Close :)
file('file.html');
see http://www.php.net/file
or
ri
Cc: php-general@lists.php.net
Subject: Re: [PHP] Retrieve output from HTML or PHP file
Hi Peter,
Close :)
file('file.html');
see http://www.php.net/file
or
file_get_contents('file.html');
see http://www.php.net/file_get_contents
the 'file' function returns an arr
Hi Peter,
Close :)
file('file.html');
see http://www.php.net/file
or
file_get_contents('file.html');
see http://www.php.net/file_get_contents
the 'file' function returns an array, 'file_get_contents' returns it as
a string.
Peter Lauri wrote:
Best group member,
I have a php script run
6 matches
Mail list logo