Quick way to check if a string consists entirely of characters within the mask is to compare strspn with strlen eg:
<?php
$path = $_SERVER['PATH_INFO'];
if (strspn($path,'/') == strlen($path)) {
//PATH_INFO is empty
}
?>
Quick way to check if a string consists entirely of characters within the mask is to compare strspn with strlen eg:
<?php
$path = $_SERVER['PATH_INFO'];
if (strspn($path,'/') == strlen($path)) {
//PATH_INFO is empty
}
?>