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://

The file:// wrapper is a native PHP wrapper, to access files on a local filesystem, on the host system.

It may also be omitted, as the default behavior is to read files on the local system.

<?php

    // display the content of a file
    // 3 / : two for protocol, one for path
    print_r(file_get_content('file:///tmp/file.txt'));
    
    // also possible
    print_r(file_get_content('/tmp/file.txt'));

?>

Documentation

See Also