[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_ConfigGetValue

Overview

Get a configuration file variable

Syntax

    char *Ns_ConfigGetValue(
    	char *sectionName,
    	char *key
    );

Description

This function returns the value for the given key in the section named sectionName. If either the section does not exist or the key does not exist in the section, the function returns NULL. If multiple keys of the same name are in the named section (for example, the multiple Load lines of the Modules section), this function returns only the first matching entry. The section names must match exactly, but the key will be matched case-insensitively. Ns_ConfigGetValueExact is the case-sensitive counterpart of this function.

The space for the string returned is located in the configuration data. You must not deallocate or modify the string.

Example

    	/* Fetch the home directory of the AOLserver. */
    
    	char *home;
    
    	home = Ns_ConfigGetValue("[ns/parameters]", "Home");

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.