Why isn't this standalone code working:
$link = 'https://google.com';
$unacceptables = array('https:','.doc','.pdf', '.jpg', '.jpeg', '.gif', '.bmp', '.png');
foreach ($unacceptables as $unacceptable) {
if (strpos($link, $unacceptable) === true) {
echo 'Unacceptable Found<br />';
} else {
echo 'Acceptable!<br />';
}
}
It's printing acceptable every time even though https is contained within the $link
variable.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…