For science.
Say I have the following code:
<?php
$filename = $_GET['filename'] . '.csv';
$handle = @fopen($filename);
We know that the null byte exploit is long gone, but is it possible to get around the above appending of .csv, in order to read a file with another extension? Very creative souls exist.
Reading remote files works, filename=http://example.com/some.csv (.csv is appended automatically).