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?

109 of 206 people (53%) answered Yes
Recently 5 of 10 people (50%) answered Yes


How can I save php output to the browser and a file?

Feb 20th, 2008 22:46
dman, Rada Eulen, helmut ott, Ben Udall, http://www.ttnr.org

$output = "my output";
if($file=fopen($myfile, "w")) {  //open file for writing
	fwrite($file, $output);      //write to file
print $output; //display in the browser