Pow file put contents

From PlainOldWebserver

Jump to: navigation, search

Back to Top


pow_file_put_contents()

This writes a file. Options for the third argument are "w" for write, "wb" for write binary, "wa" for write+append and "wba" for write binary+append.

  <?sjs
    pow_file_put_contents("/pow/htdocs/new_file.txt", 
        "This is a new file\n","w");
    var contents = pow_file("new_file.txt");
    document.writeln(contents);
  ?>

Result:

 This is a new file

See Also

Personal tools
Navigation