Reply to Re: Read *parsed* PHP file into a variable?

Your name:

Reply:


Posted by Philip Ronan on 08/24/05 22:07

"Daniel Loose" wrote:

> Hello,
>
> I have this strange including problem:
>
> I want to read a piece of HTML, residing in some file, into a
> variable, not echo it out. So far so easy - but now the HTML contains
> a line of PHP. And I wish not to get the PHP code into my variable but
> the parsed result, just like if the variable was a client ;-). I wish
> to keep the nice ?> ...<? HTML area (with highlighting in my editor),
> and therefore include etc. don't help because they would echo it out.
> heredoc also doesnt help (if this may come up to your mind).
>
> Is there anything I can do...?!! The problem sounds so simple... the
> more for such a great tool like PHP ... but... ?!!

Easy: $html = file_get_contents('http://www.example.com/foo.bar');

Take a look here: <http://php.net/file_get_contents>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация