4,250
社区成员
发帖
与我相关
我的任务
分享function getVersionTxtInfo(){
//其它代码........
if (count($fileContentItem) != VERSION_TXT_ITEM_COUNT)
{
throw new Exception("-1");
}
//其它代码.........
}
另一个controller:
try{
$fileContentItem=$this->Common->getVersionTxtInfo();
$version=$fileContentItem[0];
if(empty($version)){
$version = "0";
}
}catch(Exception $ex){
$version = "0";
echo $e->getMessage();
}