Outputting a standard HTTP header line

put_web_header()

Output a standard HTTP header line


SYNTAX

put_web_header (header_name, value)

Output a standard HTTP header line for the specified header parameter.

This function must be called before any print or put statement is executed, since headers must be placed at the start of the HTML output.

Sculptor automatically outputs the following standard headers:

Server: server_name
Content-Type:…

The default content type is “TEXT/HTML”. This may be set to another value by means of the web_content_type() function.

The function returns 0 (OK) or a negative value to indicate an error. The only possible error for this function is WWW_ERR_NOT_IN_HEADER (a print or put statement has been executed).


RELATED TOPICS

Creating web pages with Sculptor

Internet functions

Internet function error codes