file extensions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

file extensions

Post by shiznatix »

im made a little upload script but i only want files with the extension of .mp3 to be allowed to upload. how do i do this with php 4?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]substr()[/php_man]

note: the file extension does not guarantee that it is indeed that type of file.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

this i understand but im getting rid of "n00bs" this way. the rest are welcome to do what they can. to the ones who know what they are doing i say, lets dance :D
Post Reply