Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

File Mode

The file mode is the configuration of the pointer when accessing to the file.

In the example above, w+ indicates that the file is open for writing and reading, and place the pointer at the beginning of the file.

There are several valid modes: ‘r’, ‘r+’, ‘w’, ‘w+’, ‘a’, ‘a+’, ‘x’, ‘x+’, ‘c’, ‘c+’, ‘e’. Check docs for details about them.

<?php

    $fp = fopen($file, 'w+');

?>

Documentation

See Also