note 109879 deleted from language.functions by aharvey
| From: | aharvey@php.net | Date: | Fri, 31 Aug 2012 06:41:20 +0000 |
| Subject: | note 109879 deleted from language.functions by aharvey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190293@lists.php.net to get a copy of this message | ||
Note Submitter: BravoSlayer
----
<?php
// Contains Bad
// Parameters textToCheck
// textToCheck is the name which will be searched
// for bad characters
// Returns true or false.
// True Means Bad Character is found
// False Means Bad Character Is Not Found
function containsbad ($textToCheck)
{
foreach (array( "..", "\\", "/", "...",
"'", "*", ";", ' ', "(", ")",
"_", "-" ) as $value)
{
$check = strpos($textToCheck, $value);
if ($check !== false)
{
return true;
}
}
return false;
}
?>