Thread: $_files
View Single Post
10-10-2005, 01:16 PM
#4
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

You could rely on the file's extension for some soft protection. Obviously that wouldn't stop people uploading an image (or any other type) file with a .txt extension. However, if you force the server (using .htaccess or some such device) to only output plain text from the folder(s) where the files are being stored then their uploading any other type of file than plain text would be pointless.