读取文本文件
<h1>功能</h1>
<p>读取指定文件中的所有字符。</p>
<h1>文件</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>文件名[*]</td>
<td>【字符串】要读取的文件的路径。</td>
<td>'D:\桌面\文本文件\test.txt'</td>
</tr>
</tbody>
</table>
<h1>选项</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>编码</td>
<td>[整型]自定义,按需求选择。Default/Ansi/UTF8/UTF16/UTF32。</td>
<td>Default</td>
</tr>
</tbody>
</table>
<h1>输出</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>内容</td>
<td>【字符串】从文件中提取的文本存储到字符串变量。</td>
<td>文本内容(创建变量)</td>
</tr>
</tbody>
</table>
<h1>注意/说明</h1>
<p>1.创建的变量传入【日志消息】函数中,即可在控制台显示出来。</p>
<h1>相关函数</h1>
<p>无</p>
<h1>示例/演示</h1>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/4f0dbbbaf91498d14dcff31609127395" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/e5701ee1a50e5e5ba74a04367bf508d2" title="[组件[读取文本文件函数示例]_20210413.db">组件[读取文本文件函数示例]_20210413.db</a></p>