getMessage()); } catch (\Exception $exception) { throw new \Exception($exception->getMessage()); } } /** * 判断网址后否包含http || https * @param string $url 网址 * @return boolean 真返回真,假返回假 */ public static function isHttp($url){ if(preg_match("/^(http:\/\/|https:\/\/).*$/",$url)){ return 1; }else{ return 0; } } }