Specifies the Web Server root directory.

void object->SetDocumentRoot( string directory_pathname )

Arguments

object
Required. A Chart object.
directory_pathname
Required. A string specifying the absolute pathname of the web server root directory.

Remarks

Swiff Chart Generator requires the absolute pathname of the root directory in order to locate the chart cache folder. The document root directory is the directory on the disk associated with the Web Server root (i.e. the directory corresponding to http://<my_server>/)

The document root is usually automatically determined by the Chart object. However, there are some rare situations it needs to be set manually.

PHP Sample Code

The following PHP code illustrates use of the SetDocumentRoot method.

// Manually set the Document Root directory
$chart->SetDocumentRoot("/home/httpd/my_server");

See Also

SetOutputFormat Method | GetOutputLocation Method | SetCacheName Method | SetPrivateCacheDir Method | SetMaxCacheSize Method | ClearCache Method | UseCache Method

Applies To: Chart Object