Home  >  Article  >  Backend Development  >  Directory name legality detection_PHP tutorial

Directory name legality detection_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:06:561310browse

Directory name legality detection
//Directory name legality detection
function isen($str){
$ret="";
for( $i=0;$i $p=ord(substr($str,$i,1));
if(($p<48 & $p!=45 & $p!=46) || ( $p>57 & $p<65) || ($p>90 & $p<97 & $p!=95) || $p>122){
nerror("Does not meet specification!");
}
$ret.=chr($p);
}
return $ret;
}
?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444983.htmlTechArticleDirectory name legality detection?php tutorial//Directory name legality detection function isen($str){ $ret =; for($i=0;$i $p=ord(substr($str,$i,1)); if(($p48 $p!=45 $p!=46) || ($p57 $ p65) || ($...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn