I have a working script, someone gave me, I am trying to modify. I have the following segment:
This segment is handling a 'post' in which 'upload_file' is the passed file name. What I want to do is extract the file extension but I cannot find anything in the documentation on '$_FILES'. Trying the obvious:
or:
does not work.
Can someone point me in the right direction? Thanks.
Code:
$upload_file = $_FILES['upload_file']['name'];
$size = $_FILES['upload_file']['size'];
$temp = $_FILES['upload_file']['tmp_name'];
Code:
$type = $_FILES['upload_file']['type'];
Code:
$type = $_FILES['upload_file']['ext'];
Can someone point me in the right direction? Thanks.