php + delete the content of a file
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: php + delete the content of a file

  1. #1
    A matrix memeber issamneo's Avatar
    Join Date
    May 2004
    Location
    Tunisia
    Posts
    156

    php + delete the content of a file

    hi
    please with php how to delete the content of file after opening it
    $myTextFileHandler = @fopen("data.xml","r+");
    $txtfileArray = @file("data.xml");
    The Matrix Has You
    -------------------
    end transmission
    -------------------
    h

  2. #2
    opening the file in write mode should delete the contents of the file

    PHP Code:
    $fp fopen("myfile"w);
    fclose($fp); 
    If it is already open you should close it first with
    fclose($filePointer);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com