note 61427 deleted from function.move-uploaded-file by cmb
| From: | cmb@php.net | Date: | Mon, 08 Apr 2019 06:41:01 +0000 |
| Subject: | note 61427 deleted from function.move-uploaded-file by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210570@lists.php.net to get a copy of this message | ||
Note Submitter: adam at darkhousemedia dot com
----
To retrieve the file extension, I think this example makes more sense than the one below.
$ext = explode(".", $file);
$ext = array_pop($ext);
It doesn't have to count() the array and then subtract 1 to point to the proper array element,
it simply isolates the last element of the array, and discards everything else.