$filename = 'my_upgrade(1).zip';
$match = 'my_upgrade';
if(!strpos($filename, $match))
{
die();
}
else
{
//proceed
}
In the code above, I'm trying to die out of the script when the filename does not contain the text string "my_upgrade". However, in the example given, it should not die since "my_upgrade(1).zip" contains the string "my_upgrade".
What am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…