faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

30 of 36 people (83%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Is there some PHP code that takes the output of one file, and placing it in another?

Nov 27th, 2008 02:26
healthy man, dman, Articles Way, Joshua Ariizumi, Matt J, http://www.ttnr.org


If you want to embed an HTML file, you should use
 include("myfile.html");
This also works with PHP files.  However, they have to be in <? ?>, 
otherwise, it won't work.  Also, variables carry over into the file, 
and variables modified in the file carry over into the referring file.
If you want to get the HTML output of the file, try something like:
  $src = fopen("http://example.com/file.php", "r");
  fpassthru($src);
  fclose($src);
which would just pass thru the HTTP output of the parsed PHP file 
(basically, HTML data).
====
oracle.com/technology/pub/articles/deployphp/alshanetsky_deployphp.html
http://www.healthdothealth.com
http://www.healthxhealth.com
http://www.mesotheliomainmesothelioma.com
http://www.healthfirewall.com
http://www.flathealth.com
http://www.healthbodyguard.com