I have uploaded a file using HTML / PHP and following is the print_r() of the $_FILES[\'file\'] array:
Array
(
[name] => Chrysanthemum.jpg
[type] =>
$tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
$upload_dir = ini_get('upload_tmp_dir');
Php file upload temporary directory is a php config variable located on php.ini file.
You can get the variable config value by using ini_get
function.
$path = ini_get('upload_tmp_dir');
// your code here