- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 对提交参数编码
function ParamsEncode(const ASrc: Ansistring): AnsiString;
var i: Integer;
begin
Result := '';
for i := 1 to Length(ASrc) do
begin
if (ASrc[i] in ['&', '*','#','%','<','>',' ','[',']'])
or (not (ASrc[i] in [#33..#128]))
then
begin
Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2);
end
else
begin
Result := Result + ASrc[i];
end;
end;
end;