/ Published in: PHP

URL: http://www.apphp.com/index.php?snippet=php-get-file-extension
This code allows to pass filename in the $file_name variable and function will return file extension only.
Expand |
Embed | Plain Text
<?php function get_file_extension($file_name) { /* may contain multiple dots */ return $extension; } ?>
You need to login to post a comment.