dan_bsb Posted January 26, 2014 Share Posted January 26, 2014 Hey, I'm having a trouble with a code: Warning: preg_match(): Unknown modifier ')' in C:\xampp\htdocs\simulado\1\cadastro_query.php on line 24 Line 24 is: if(!preg_match("/^image\/(pjpeg|jpeg|png|gif|bmp/i)$", $img["type"])){ $error[1] = "This is not a valid image type."; } Can someone help? Link to comment https://forums.phpfreaks.com/topic/285688-help-with-preg_match/ Share on other sites More sharing options...
Ch0cu3r Posted January 26, 2014 Share Posted January 26, 2014 The end of the regex should read bmp)$/i" the )$ should be before /i Link to comment https://forums.phpfreaks.com/topic/285688-help-with-preg_match/#findComment-1466605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.