note 36684 added to function.highlight-file

From: Date: Sat, 18 Oct 2003 15:16:33 +0000
Subject: note 36684 added to function.highlight-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-58811@lists.php.net to get a copy of this message
while highlight_file() function displays the php code of a file, is there a function which will get me the html code of the php file after executing the php file. I have a php file say a.php , now once this a.php is accessed by a user some html code can be seen in the View Source. I want to store that html code in a another file and name it z.html. How do I acheive this. For those who didnt understand my question, I will ellaborate more: I have a php file a.php which gets some data from the database and then displays the data. Now the data in the database is update only once in 2 months. So most of the times the php file displays the same output till 2 months i.e. till the data is changed in the database. Now what I want to do is rather than the users accessing the php file everytime and the php file executing queries on the database every time, I want the php file to create an html file which will be accessed by the users and once in 2 months the html file will be updated when there is a change in the database. Now this html file should not be updated manually, there could be another php file say b.php which takes the output of a.php and writes it in z.html file. I just need to know if there exists any html function which gives us the html source code of a php file once that php file is executed. Rest of the things i'll manage on my own. Your help will be highly appreciated. Thanks Ritesh ---- Manual Page -- http://www.php.net/manual/en/function.highlight-file.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36684 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36684&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36684&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58811) next »