idhttp的get方法當中URL字符串過長怎麼處理? |
答題得分者是:hagar
|
linxi
一般會員 發表:17 回覆:15 積分:6 註冊:2004-08-29 發送簡訊給我 |
各位高人,小妹用idhttp時遇到了一個問題:
procedure TForm1.Button1Click(Sender: TObject);
var
url1:string;
begin
url1:='http://www.xxxx.com/search/sole/agen.cgi?t=ah&keys=hfhmfifffsfmshahahhvhfzchkspzkcoxhxascdddofoscfxhhcvcahzdasffofxhhhcsdzksdaadyfssmdmachhchfvffakfahhhoxmxixcfosoasddhhdszoahzmaafkddsfdismaszyafdnskssadfcsdhszizzsosafxssfphpcfznhnscsszzskahfhzncohhddhhdvaxsihpxzzohdfmacfkfoaifczmzcxxfmsdandddhfozhcxhhhzdaayfxffapxxxdaashhhzcssdxhvzfzkhfaasdfxahfdhpxzcycydhaydnhfadsixmzkzifmahdksidfdycscvaaddskfshfahfczvcizofaakshsfaydfhzzsazdxhxfasyaxavzzzfxxsfafaydzsfaocscvhxfhsoaksksvafafhdckasfadkdsfpdfcpasxafndydodzdyfhzcxzhzdvazamszdcdkzocfxpacfpaxdcfvshcvcpxhhfsvfaahdzfyhdzkxffzaxdpdhdodsascmhdsyhxsadmdaaoxccpznfzaydihcsndyaazozoapdcdhahfxakhfhhxnaasfaffcsadvcoxzcfdvaaafdmsisxzxzvhddvshfafoddfpaahacnfpsizhfssidoczaxcfdnfxzzsyhhdyxchdxdfxskdmfchhaoxmxxchszshzxapacffzohacmhssnfdsydxsaxdaaasahaafcskdsdncpahadfohhavfoffhphfanaaafhvszziaysphdsmhfassxapacszapsohhsyzyhiaxszsfaoakhizhsnzszvdfddzkaxazaszkhczvafadsx&kw=watches';
memo1.Text:=http1.Get(url);
end;
為什麼編譯時無法通過呢,提示字符過長,我該怎麼辦? 發表人 - linxi 於 2004/08/29 14:01:14
|
hagar
版主 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
改成如下試試(就是程式碼一行不要超過 255 個字元):
procedure TForm1.Button1Click(Sender: TObject); var url1:string; begin url1 := 'http://www.xxxx.com/search/sole/agen.cgi?t=ah&keys=' + 'hfhmfifffsfmshahahhvhfzchkspzkcoxhxascdddofoscfxhhcvcahzdasff' + 'ofxhhhcsdzksdaadyfssmdmachhchfvffakfahhhoxmxixcfosoasddhhdszo' + 'ahzmaafkddsfdismaszyafdnskssadfcsdhszizzsosafxssfphpcfznhnscs' + 'szzskahfhzncohhddhhdvaxsihpxzzohdfmacfkfoaifczmzcxxfmsdandddh' + 'fozhcxhhhzdaayfxffapxxxdaashhhzcssdxhvzfzkhfaasdfxahfdhpxzcyc' + 'ydhaydnhfadsixmzkzifmahdksidfdycscvaaddskfshfahfczvcizofaaksh' + 'sfaydfhzzsazdxhxfasyaxavzzzfxxsfafaydzsfaocscvhxfhsoaksksvafa' + 'fhdckasfadkdsfpdfcpasxafndydodzdyfhzcxzhzdvazamszdcdkzocfxpac' + 'fpaxdcfvshcvcpxhhfsvfaahdzfyhdzkxffzaxdpdhdodsascmhdsyhxsadmd' + 'aaoxccpznfzaydihcsndyaazozoapdcdhahfxakhfhhxnaasfaffcsadvcoxz' + 'cfdvaaafdmsisxzxzvhddvshfafoddfpaahacnfpsizhfssidoczaxcfdnfxz' + 'zsyhhdyxchdxdfxskdmfchhaoxmxxchszshzxapacffzohacmhssnfdsydxsa' + 'xdaaasahaafcskdsdncpahadfohhavfoffhphfanaaafhvszziaysphdsmhfa' + 'ssxapacszapsohhsyzyhiaxszsfaoakhizhsnzszvdfddzkaxazaszkhczvaf' + 'adsx&kw=watches'; memo1.Text := http1.Get(url); end;-- 歡迎光臨 KTop 研究院! |
linxi
一般會員 發表:17 回覆:15 積分:6 註冊:2004-08-29 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |