12-13-2010, 06:30 AM
[eluser]kris10[/eluser]
Hello
Writing an application with music file, I write the upload code
But what I would like to to is rename the file by the id of the record but keep the extension.
I already rename by 1.mp3 or id but I can I have other extension
I don't know how to check the extension it could be mp3 ogg or wma ...
how to replace ".mp3" but the right code in order to keep the orgininal ext of the file and just rename the name of the file
Hello
Writing an application with music file, I write the upload code
But what I would like to to is rename the file by the id of the record but keep the extension.
I already rename by 1.mp3 or id but I can I have other extension
I don't know how to check the extension it could be mp3 ogg or wma ...
Quote:$config['file_name'] = $_POST['id'].".mp3";
how to replace ".mp3" but the right code in order to keep the orgininal ext of the file and just rename the name of the file