Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Difference with FileDisplay
  • Use in PHP
  • Pre-launched sessions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
StringDisplay (Function)
In french: ChaîneAffiche
AjaxNot available
Returns a specific string (or a buffer) to the client browser in response to a request. Allows you to display documents in the browser of Web user without having to use a file.
PHP In this version, this function can only be used to return a specific string.
s is string
s = "<HTML>Text '''bold'''</HTML>"
StringDisplay(<Buffer\Character string> [, <MIME type> [, <Name of file for backup>]])
<Buffer\Character string>: Buffer or character string
Buffer or character string that will be displayed in the browser.
<MIME type>: Optional Ansi character string
  • Name of MIME type to use. The MIME type allows you to indicate to the browser the type of string to use. More than 150 types are defined in the MIME communication standard (available on Internet). The most common values recognized by most browsers are:
    • "application/pdf": document in PDF format (*.pdf)
    • "text/html": HTML page (*.htm, *.html)
    • "text/plain": text file (*.txt)
    • "image/gif": image in GIF format (*.gif)
    • "image/jpeg": image in JPEG format (*.jpg, *.jpeg)
    • "video/mpeg": video in MPEG format (*.mpg, *.mpeg)
  • MIME type corresponding to one of the following constants:
    typeMimeXMLApplicationXML content.
    typeMimeBinaryBinary content (byte stream).
    typeMimeDOCContent such as Word file (*.doc)
    typeMimeDOCXContent such as Word file (*.docx)
    typeMimeGIFContent such as Image in GIF format (*.gif)
    typeMimeHTMLContent such as HTML page (*.htm, *.html)
    typeMimeJPEGContent such as image in JPEG format (*.jpg, *.jpeg)
    typeMimeJSONJSON content.
    typeMimePDFContent such as PDF document (*.pdf)
    typeMimePNGContent such as image in JPEG format (*.png)
    typeMimeSOAPSOAP content in XML format.
    typeMimeTextContent in text format (*.txt)
    typeMimeXMLTextText content in XML format
    typeMimeXLSContent in Excel format (*.xls)
    typeMimeXLSXContent in Excel format (*.xlsx)
    typeMimeZIPContent in ZIP format (*.zip)
<Name of file for backup>: Optional character string
Name of file to save if the Web user wants to download the file onto his computer. If this parameter is specified, the file download is automatically proposed.
WEBDEV - Server codeWindows

Difference with FileDisplay

This function is equivalent to FileDisplay but the source used in a memory string (instead of a file).

Use in PHP

In PHP, the traces displayed in the page by Trace are also displayed by StringDisplay. Indeed, all the page codes are run before displaying the page: the traces are taken into account by StringDisplay.

Pre-launched sessions

If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initializing the project after connection to the site" event.
Business / UI classification: UI Code
Component: wd280page.dll
Minimum version required
  • Version 9
Click [Add] to post a comment

Last update: 11/21/2022

Send a report | Local help