Re: Question for an interpret function

From: Date: Tue, 09 Jul 2002 07:52:16 +0000
Subject: Re: Question for an interpret function
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-11216@lists.php.net to get a copy of this message
Sorry, but this email address is not the appropriate forum for asking support questions. For a list of more appropriate places to ask for help using PHP, please visit http://php.net/support Thank you for your interest in PHP. Goba [one webmaster@php.net] ----- Original Message ----- From: "Jacobo Benitez" <jacobo3000@hotmail.com> To: <webmaster@php.net> Sent: Tuesday, July 09, 2002 2:04 AM Subject: Question for an interpret function > Hello > > Im doing a program, but I need to create an html document that have results > of php code. > > Example: > > I have a file that name is: copy.inc > In this file I have that code: > ============ copy.inc ============= > <?php > for ($i=1; $i<=9; $i++) { > echo "Hello<br>\n"; > } > ?> > =================================== > > And I want to copy the code that copy.inc have to another file named: > copy.html > Here is how I copy the code: > I have another file named: copy.php > ============ copy.php ============= > <?php > $file = fopen("copy.inc","r"); > $source = fread($file,1000000); > fclose($thefile); > > $copy = fopen("copy.html","w"); > fwrite($copy,$source); > fclose($copy); > } > ?> > =================================== > > But when I do that, in copy.html copy the full php code, not copy the html > interpreted code, how can I do to interpret the php code of copy.inc to html > code before copy the code of copy.inc to copy.html? > > I need that in copy.html the source be: > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > Hello<br> > > no > > <?php > for ($i=1; $i<=9; $i++) { > echo "Hello<br>\n"; > } > ?> > > If you know that please e-mail me! > > Thanks > Jacobo > > _________________________________________________________________ > Charle con sus amigos online usando MSN Messenger: http://messenger.msn.com > >

« previous php.mirrors (#11216) next »