Delphi保存字符串到文本文件的方法
(2020-03-07 11:30:23)
标签:
delphi文件 |
分类: delphi |
Delphi保存字符串到文本文件的方法
Delphi保存字符串到文本文件,若指定文件不存在,则自动创建;保存字符串时采用累加形式。
procedure mSaveToFile(const FileName: string; sts: string);
var
begin
end;
用法:
mSaveToFile(ExtractFilePath(Application.ExeName)+'test.txt', FormatDateTime('YYYY-MM-DD HH:mm:SS', now)+'测试');