845 visitas
Remove the extension from a filename in PHP
This works in all cases I tested, even when the filename has several dots.
PHP
- /**
- * Removes the extension from a filename and returns it
- *
- * @param string $original The original filename
- * @return string The file name without the extension
- */
- function removeFilenameExtension($original)
- {
- }
Enviado por miguelSantirso hace over 2 years — modificado por última vez hace less than a minute