Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
possowski

Ch 11 clearing the text file

Recommended Posts

I plan to modify the add_quote.php and quote.txt file into a grocery list that can be saved then printed.  I looked in the online php manual and found a clear fcn (->clear) that seems to be able to clear an array, but can it also clear the contents of the txt file?  

Share this post


Link to post
Share on other sites

It's not clear to me what function you're referring to, but I'm pretty certain the answer would be "no". The easiest way to clear the contents of a text file would be to delete the text file and then recreate it. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...