如何判断这中 url http://www.baidu.com/baidu.rar 是不是有效 下面这个函数 是我写的 如果参数是 http://www.baidu.com 这个函数有效 但是参数是http://www.baidu.com/baidu.rar的时候这个函数 就没了效果谁能告诉我应该怎么改 function get(url: string): boolean; var idhttp: tidhttp; ss: string; begin result:= false; idhttp:= tidhttp.create(nil); try try idhttp.handleredirects:= true; //必须支持重定向否则可能出错9c ?$m g7z y {0k m o idhttp.readtimeout:= 30000; //超过这个时间则不再访问 ss:= idhttp.get(url); if idhttp.responsecode=200 then result :=true; except end; finally idhttp.free; end; end;
function get(url: string): boolean; var idhttp: tidhttp; ss: string; begin result:= false; idhttp:= tidhttp.create(nil); try try idhttp.handleredirects:= true; //必须支持重定向否则可能出错9c ?$m g7z y {0k m o idhttp.readtimeout:= 30000; //超过这个时间则不再访问 ss:= idhttp.get(url); if idhttp.responsecode=200 then result :=true; except end; finally idhttp.free; end; end;