Re: writing to file quick and easy.

From: Date: Wed, 23 May 2001 16:59:30 +0000
Subject: Re: writing to file quick and easy.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54098@lists.php.net to get a copy of this message
sure this is not complicated, this is easy :) <?php $filename = '/dl/filename.txt'; echo " put some <font size='+2'>HTML</font> in here, anything you put here, will goto the file too.<br> <a href='$filename'>Download</a> "; $file = fopen("$DOCUMENT_ROOT$filename", 'w+'); fwrite($file, ob_get_contents()); ?> is this what you mean ? please get back to me. -- Chris Lee lee@mediawaveonline.com ""Christopher Allen"" <callen@driver8.org> wrote in message news:004701c0e3a0$5c17a5a0$babda318@mn.mediaone.net... > Hello: > > Lookin for a little advice here. > > I have a series of scripts that dynamically create web pages. The last page > in the series I wish to be able to write out to a file. > Is there a simple/quick way in which I can take the process(ing) script and > write it to a file at the same time that it is displaying? > I need it to both display and be able to be downloaded such that the last > thing that this script would do is create a link to itself in html format. > Something to the effect that whatever was being passed to the browser could > also be passed thru an open file handle thus written to a file???? > > > Thanks, > Christopher C. M. Allen > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#54098) next »