Deleting a previous variable/ or moving it
Posted: Mon Oct 02, 2006 11:01 am
I have a calendar php script that I can update from a flash file. Only problem is everytime I update it cuts off because of this coming too soon
Right now the only way I know how to add this is to the end of a fwrite:
I have the <events> at the top of the file, where it is never bothered. But if I put </events> at the bottom of the file, it is soon over written by the next <event>, thus this is why I have it in the "fwrite".
So my question/s: Is there a way to secure the placement of </events> at the bottom of the text file? If not is there a way to delete the previous </events> and then write another to cap the file off? Thanks for any help
Code: Select all
</events>Code: Select all
$writeInTxtFile = @fwrite($myTextFileHandler,"\<event title=\"$receivedFromFlashData\" description=\"once upon a time\" startDate=\"2006-10-01 15:30:00\" endDate=\"2006-10-01 17:30:00\" allDay=\"0\" eventType=\"once\"/></events>");So my question/s: Is there a way to secure the placement of </events> at the bottom of the text file? If not is there a way to delete the previous </events> and then write another to cap the file off? Thanks for any help