You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/helpers/citydistance_helper.php

25 lines
503 B
PHP

<?php
//查询两地之间的距离
function get_city_distance($start_city,$destination_city)
{
$CI = & get_instance();
$CI->lang->load('city_distance');
$result=$CI->lang->line('c_distance');
$str1=$start_city.$destination_city;//拼接数组键
$str2=$destination_city.$start_city;//拼接数组键
if(isset($result[$str1])){
return $result[$str1];
}
if(isset($result[$str2])){
return $result[$str2];
}
log_message('info',"查询失败");
return 0;
}
?>