Help / WLanguage / WLanguage functions / Web-specific functions / Miscellaneous WEBDEV functions
  • Difference with FileDisplay
  • Use in PHP
  • Pre-launched sessions
  • Web services
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 user's browser without using 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:
    mimeTypeXMLApplicationXML content.
    mimeTypeBinaryBinary content (byte stream).
    mimeTypeDOCWord file (*.doc)
    mimeTypeDOCXWord file (*.docx)
    mimeTypeGIFGIF image (*.gif)
    mimeTypeHTMLHTML page (*.htm, *.html)
    mimeTypeJPEGJPEG image (*.jpg, *.jpeg)
    mimeTypeJSONJSON content.
    mimeTypePDFPDF document (*.pdf)
    mimeTypePNGJPEG image (*.png)
    mimeTypeSOAPSOAP content in XML format.
    mimeTypeTextText (*.txt)
    mimeTypeXMLTextXML text
    mimeTypeXLSExcel file (*.xls)
    mimeTypeXLSXExcel file (*.xlsx)
    mimeTypeZIPZIP file (*.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 "Initialize project after connecting to the site" event.

Web services

This function can be used in web services.
Business / UI classification: UI Code
Component: wd290page.dll
Minimum version required
  • Version 9
Click [Add] to post a comment

Last update: 12/20/2023

Send a report | Local help