* 参数:{$params $str string [搜索目录]}
* 返回: {$result string [转换结果]}
public function toUnderScore($str){
$array = array();
for($i=0;$i<strlen($str);$i++){
if($str[$i] == strtolower($str[$i])){
$array[] = $str[$i];
}else{
if($i>0){
$array[] = '_';
}
$array[] = strtolower($str[$i]);
}
}
$result = implode('',$array);
return $result;
}