[Tutos-commits] SF.net SVN: tutos:[1282] trunk/php/file/file_ins.php
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
From: <gok...@us...> - 2015-03-14 08:42:38
|
Revision: 1282 http://sourceforge.net/p/tutos/code/1282 Author: gokohnert Date: 2015-03-14 08:42:36 +0000 (Sat, 14 Mar 2015) Log Message: ----------- fix Modified Paths: -------------- trunk/php/file/file_ins.php Modified: trunk/php/file/file_ins.php =================================================================== --- trunk/php/file/file_ins.php 2015-03-13 19:20:14 UTC (rev 1281) +++ trunk/php/file/file_ins.php 2015-03-14 08:42:36 UTC (rev 1282) @@ -215,13 +215,13 @@ $farr['size'] = filesize($farr['tmp_name']); if (isset($_REQUEST['ct'])) { $farr['type'] = $_REQUEST['ct']; - } else if (ereg("\.png$",$file)) { + } else if (preg_match("#.png$#i",$file)) { $farr['type'] = 'image/png'; - } else if (ereg("\.gif$",$file)) { + } else if (preg_match("#.gif#i",$file)) { $farr['type'] = 'image/gif'; - } else if (ereg("\.jpg$",$file)) { + } else if (preg_match("#.jpg$#i",$file)) { $farr['type'] = 'image/jpeg'; - } else if (ereg("\.pdf$",$file)) { + } else if (preg_match("#.pdf$#i",$file)) { $farr['type'] = 'application/pdf'; } else { $farr['type'] = 'any'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |