$filename = \'my_upgrade(1).zip\';
$match = \'my_upgrade\';
if(!strpos($filename, $match))
{
die();
}
else
{
//proceed
}
In
The strpos() function is case-sensitive.
if(strpos($filename, $match) !== false)
{
// $match is present in $filename
}
else
{
// $match is not present in $filename
}
For using case-insensitive.
use stripos() that is it finds the position of the first occurrence of a string inside another string (case-insensitive)