Eimage (only two lines of code implement the output of binary fields queried from the database) label

Source: Internet
Author: User

Function:

Designed to output binary fields queried from the database to the browser, supporting dozens of common file types

Alias is Edoc

Usage:

<chtml> <eimage id= schoolbag name type= type >key</eimage></chtml> or
<chtml> <edocid== schoolbag name type= type >key</edoc></chtml>

· ID: schoolbag name, esql label return school bag names

· Type: types, output file types, such as JPG, GIF, doc, PDF, swf ...

· Key: keyword, quite a keyword in a value expression

· File extension: The file extension for this type of use must be img, and the system will be able to automatically identify the type and use the corresponding processing method

Example:

Query the contents of binary fields

<esql module=base id=list>select FILE from qx_cloudatlas_a Where id= ' 001 ' </ESql>
Output
<eimage id=list type=jpg>file</eimage>
All code
<chtml><esql module=base id=list>select FILE from qx_cloudatlas_a Where id= ' 001 ' </esql><eimage ID =list type=jpg>file</eimage></chtml>

Query table with only two lines of code implementationqx_cloudatlas_a, retrieve whenid= ' 001 'When recording, put the field that holds the pictureFILEByjpgFormat output to customer IE, the above content is saved in the File.img file, accessed in the/WEBEASY/FILE.IMG format


Easy to download resources for Internet development Platform

Platform and Latest development Manuals free Download: http://download.csdn.net/detail/tx18/8464425

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

Light open platform will be upgraded to provide you with more powerful and easy features, please pay attention to Download the latest version


Eimage (only two lines of code implement the output of binary fields queried from the database) label

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.