$url = ''; $info = parse_url($url); $httpClient = new HttpClient($info['host']); $httpClient->get($info['path']); if ($httpClient->getStatus() === '404') { //处理 }
本文来自博客园,作者:Bin_x,转载请注明原文链接:https://www.cnblogs.com/Bin-x/p/4648658.html