|
Author |
Message |
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Apr 28, 2002 4:35 pm (21 years, 12 months ago) |
|
Another question related to my script!
My script outputs headlines to a html file, and this is included in one of my pages, therefore giving me news headlines, however, is there a way I can make the file empty by adding a function to the script, but not deleting the file, because at the moment, I have to upload another blank copy of the article_summary.html file to empty it. |
|
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Sun Apr 28, 2002 5:02 pm (21 years, 12 months ago) |
|
Code: | $fp = fopen ("news.html", "w");
fwrite($fp, ""); |
if I read my book correctly this should write over existing data with nothing
no idea if it works though, give it a try |
|
|
|
|
Justin
4WebHelp Addict
Joined: 07 Jan 2002
Posts: 1060
|
Posted:
Sun Apr 28, 2002 5:09 pm (21 years, 12 months ago) |
|
Yep, works brilliantly, thanks |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.20456 seconds :: 19 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |