[TYPO3] PHP help ! does this code look like it would check a file extensions, and disallow php files or exe files to be attached
Dmitry Dulepov
dmitry at typo3.org
Thu Jun 14 16:06:46 CEST 2007
Rens Admiraal wrote:
> The code below is correct... If you want the right mime types you can
> search google...
Also _POST('filename')?
>> <?php
>> $allowed = array( 'file/pdf' ,
>> 'file/doc',
>> 'file/xls',
>> 'file/ppt'
>> );
>>
>> if (in_array(filetype(t3lib_div::_POST('filename'), $allowed) {
--
Dmitry Dulepov
TYPO3 freelancer / TYPO3 core team member
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
More information about the TYPO3-english
mailing list