Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[I/O] File stream modes

Comments in 'Plugin Development' started by PEMapModder, Jan 16, 2014.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What is the difference between fopen($file, "a") and fopen($file, "c") if I only want to append text to the end of a file?
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    13 views and 0 replies?
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Why is there not even one reply from 15 views?
  4. wies
    Offline

    wies Notable Member

    Joined:
    Aug 23, 2013
    Posts:
    392
    If the file exists, in mode "a" it will set the pointer to the end of the file, in mode "c" it will set the pointer to the beginning of the file.
    Last edited: Jan 18, 2014
    PEMapModder and jython234 like this.

Share This Page

Advertisement