#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    3
    Rep Power
    0
    Hi itīs me again with a better decription:
    the following script checks the size of a file, adds something to the file and then checks the filesize again.
    The Problem: itīs both the same size, but this actualli canīt be. How do I get the real size after the adding?
    See the error also at: http://www.seeagency.de/t.php3

    $file = "test.txt";

    $size=filesize($file);
    echo $size."n<br>n";

    $addtext="This text will be addes to the file!!n";

    $open=fopen($file, "a");
    fputs($open, $addtext);
    fclose($open);

    $size=filesize($file);
    echo $size;

    thanks a 1000 times,
    Kai Seefeldt
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    3
    Rep Power
    0
    I found the solution:
    clearstatcache();
    Thanks!

Similar Threads

  1. UTF-8 problem in 4.1.1a
    By mehran20 in forum MySQL Help
    Replies: 1
    Last Post: February 8th, 2004, 03:21 PM
  2. Replies: 1
    Last Post: February 8th, 2004, 02:59 PM
  3. fread problem: doesn t compile php code
    By ghorghor2002 in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 06:25 AM
  4. Wierd problem inserting data with VB6
    By gregquinn in forum MySQL Help
    Replies: 5
    Last Post: February 2nd, 2004, 08:37 AM
  5. weird java problem..please help
    By suwandy in forum Java Help
    Replies: 1
    Last Post: January 26th, 2004, 05:13 AM

IMN logo majestic logo threadwatch logo seochat tools logo