Q:

PHP reading uploaded file after post

PHP reading uploaded file content issue
I upload a txt file, and I did the following
print_r($_FILES);

The output was
Array ( [up_file] => Array ( [name] => upload.txt [type] => text/plain [tmp_name] => /tmp/phpbyrYwN [error] => 0 [size] => 26 ) ) 

When I did the following
$tmp_file_path = strtolower($_FILES['up_file']['tmp_name']); //rename file
$file_content = file_get_contents($tmp_file_path);

The   $tmp_file_path return me  /tmp/phpbyrYwN 
but $file_content return nothing, I went to root via ssh and check /tmp but did not see any file by the name /tmp/phpbyrYwN , what should I do to resolve this. 
Should I state a default directory for uploaded file in any part of the code or ? 

A:

your file system seem to be case-sensitive,
and you try to read the lower-cased file name. 
try it without the strtolower:
<? php
$tmp_file_path = $_FILES['up_file']['tmp_name']; 
$file_content = file_get_contents($tmp_file_path);

