$filename = \'my_upgrade(1).zip\';
$match = \'my_upgrade\';
if(!strpos($filename, $match))
{
die();
}
else
{
//proceed
}
In
false === strpos($filename, $match)
The strpos functionDocs returns false
if not found or 0
if found on position 0
(programmers like to start counting at 0
often):
Warning This function may return Boolean
FALSE
, but may also return a non-Boolean value which evaluates toFALSE
, such as0
or""
. Please read the section on Booleans for more information. Use the===
operator for testing the return value of this function.