File Tag Act=read (just one line of code to read the contents of the document)

Source: Internet
Author: User

Function:

· Read the contents of a file

Usage:

<file act=read[id= schoolbag name] [enc= file character encoding] method=str name= name [start=int] [end=int]> relative path file name </file>

· Act=read: Read operation

· ID: Return schoolbag name (optional, default to sign file)

· ENC: Character encoding of file contents (optional, default to platform file storage encoding @{sys:file.enc})

· Method: The current version has only STR, which is the string

· Name: Take the key name of the returned content, such as: @{schoolbag name: name}

· Start: Starting position (optional, read from here, default = 0, which is the beginning of the file)

· End: Ending position (optional, end of read here, default = 0, end of file)

Cases:

<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 contents of the file

Effect

The complete code

(example file: _samples/file_read.html)

It's easy, nothing to write about, try it

Download and description of light-open platform resources

platform free Download:http://download.csdn.net/detail/tx18/8381859

Latest Development Manual Download: http://download.csdn.net/detail/tx18/8411089

Development example: Light Open e-commerce website , free download: http://download.csdn.net/detail/tx18/8318585

The light-open platform will be upgraded to provide you with more powerful and easy features, please note the latest development manuals

File Tag Act=read (just one line of code to read the contents of the document)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.