php中判断字符串开头和结束
$str="/*zone adlidi lkdjoaihdn laidfhoh k23980ejnml ll;i;*/"
//判断字符串是否以“/*”开头
if (preg_match("/^\/\*/",$str)){
echo "true";
}else{
echo "false";
}
//判断字符串是否以“/*”结束
if (preg_match("/\*\/$/",$str)){
echo "true";
}else{
echo "false";
}