[Lazarus] Fwd: Get the htdocs foldes from server host

silvioprog silvioprog at gmail.com
Thu Jun 9 21:10:10 CEST 2011


2011/6/9 Leonardo M. Ramé <l.rame at griensu.com>:
> It should be possible, in CGI there's an environment variable called
> DOCUMENT_ROOT that contains the path you are asking for:

Yes, thx. :)

Code:

[code]
(...)
  AResponse.Content :=
    '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">' + LineEnding +
    '<html>' + LineEnding +
    '<head>' + LineEnding +
    '<title></title>' + LineEnding +
    '</head>' + LineEnding +
    '<body>' + LineEnding +
      GetEnvironmentVariable('DOCUMENT_ROOT') + LineEnding +
    '</body>' + LineEnding +
    '</html>';
(...)
[/code]

Result: C:/xampp/htdocs

Thx. \o/

> http://www.cgi101.com/class/ch3/text.html
> --
> Leonardo M. Ramé
> http://leonardorame.blogspot.com

-- 
Silvio Clécio
===============================================
Blog - <silvioprog.com.br>
Twitter - <twitter.com/silvioprog>
LazSolutions - <code.google.com/p/lazsolutions>
Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR>
===============================================
   * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
===============================================




More information about the Lazarus mailing list