获取天气-步骤2-函数编程

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了获取天气-步骤2-函数编程相关的知识,希望对你有一定的参考价值。

  1. function getWeatherInfo($sCity)
  2. {
  3. $res = shell_exec("./getWdr.sh {$city}");
  4.  
  5. return $res;
  6. }
  7.  
  8. function convertFrToC($val){
  9. return (($val+40)*5/9)-40;
  10. }

以上是关于获取天气-步骤2-函数编程的主要内容,如果未能解决你的问题,请参考以下文章