Changeset 519 for trunk/lib/Utilities.inc.php
- Timestamp:
- May 2, 2015 7:50:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r518 r519 563 563 } 564 564 565 /** 566 * Returns the extension of a file name, or an empty string if none exists. 567 * 568 * @access public 569 * @param string $file_name A name of a file, with extension after a dot. 570 * @return string The value found after the dot 571 */ 572 function getFilenameExtension($file_name) 573 { 574 preg_match('/.*?\.(\w+)$/i', trim($file_name), $ext); 575 return isset($ext[1]) ? $ext[1] : ''; 576 } 577 565 578 /* 566 579 * Convert a php.ini value (8M, 512K, etc), into integer value of bytes.
Note: See TracChangeset
for help on using the changeset viewer.