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


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

Feb 18th, 2008 19:31
dman, Articles Way, Joshua Ariizumi, Matt J, http://www.ttnr.org

If you want to embed an HTML file, you should use
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");
which would just pass thru the HTTP output of the parsed PHP file 
(basically, HTML data).