Re: include interpreted php file

From: Date: Sat, 31 Aug 2002 00:12:17 +0000
Subject: Re: include interpreted php file
Groups: php.general 
Request: Send a blank email to php-general+get-114729@lists.php.net to get a copy of this message
>pb : include a php file in an other php file >contraints : the php file must be interpreted before being included >solution known : fsock then get the html code from the server and include >it... > >Is there an other solution (easier) to include that file? Not real sure if you *want* the PHP file interpreted or not, but if not, try this: <?php $html = file("http://example.com/whatever.htm") or die("Could not load remote HTML"); echo implode('', $html); ?> You may (or may not) also want to use http://php.net/htmlentities to show the actual HTML source instead of making it a part of your web design layout HTML... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#114729) next »