AV1611 Posted December 19, 2006 Share Posted December 19, 2006 Well don't know why this don't workIt's supposed to run a script that displays a table of data then saves the html to a fileIt displays the table, but doesn't save the data to file[code]<?php$html = file_get_contents("http://blmservices.com/~osprey/webspec/index.php");echo $html;$file = "who.txt";$fp = fopen($file,"w");fclose($fp);$fp = fopen($file,"a");fwrite($fp, $html);fclose($fp);?>[/code] Link to comment https://forums.phpfreaks.com/topic/31198-saving-page-to-file/ Share on other sites More sharing options...
drifter Posted December 19, 2006 Share Posted December 19, 2006 not sure why you open then close right away... but did you check if the file is writeable? Link to comment https://forums.phpfreaks.com/topic/31198-saving-page-to-file/#findComment-144227 Share on other sites More sharing options...
michaellunsford Posted December 19, 2006 Share Posted December 19, 2006 thought to use [code=php:0]file_put_contents($file,$html);[/code] instead of all that fopen stuff? Link to comment https://forums.phpfreaks.com/topic/31198-saving-page-to-file/#findComment-144235 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.