Script Name



We use the ScriptName to construct URLs and file names. We prefer to get the script name out of the environment set up by the ServerDaemon. That way we can use links to the same script to access various databases. Should the server give us a path, we must extract the basename part of it. For example, for wiki, httpd sets the environment variable SCRIPT_NAME to /cgi/wiki. We would want just wiki.

  @path = split('/', "[Blank $ENV{SCRIPT_NAME}]");
  $ScriptName = pop(@path); 

--test

 

Last edited September 24, 2003
Return to WelcomeVisitors