File tag act = read (only one line of code reads the file content), fileact
Function:
· Read File Content
Usage:
<File act = read [id = schoolbag name] [enc = file character encoding] method = str name = name [start = int] [end = int]> file name of the relative path </file>
· Act = read: read operation
· Id: name of the returned schoolbag (optional, default: Tag name file)
· Enc: character encoding of the file content (optional, the default is the platform file storage encoding @ {sys: file. enc })
· Method: the current version only has str, which is a string.
· Name: Get the key name of the returned content, for example, @ {schoolbag name: name}
· Start: start position (optional) start from here. The default value is 0, that is, the beginning of the file)
· End: end position (optional) end of the file. The default value is 0, that is, the end of the file)
Example:
<chtml><fileid=info act=read enc=GBK method=str name=content>_samples/test.txt</file></chtml>
Read the _ samples/test.txt file and return the content in the file.
Effect
Complete code
<Html> <title> Read File content </title>
(Example file: _ samples/file_read.html)
It's really Easy. There's nothing to write. Please try it.
Download and description of light platform Resources
Platform free download: http://download.csdn.net/detail/tx18/8381859
Latest Development Manual download: http://download.csdn.net/detail/tx18/8411089
Development Instance:Light B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8318585
The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please pay attention to the latestDevelopment Manual