Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-06

Fwd: Get the htdocs foldes from server host

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

Hi.

It's possible to get the htdocs foldes from server host via a app CGI?

Eg., my htdocs is C:\xampp\htdocs, and my server host is http://localhost

Thx.

ps. Sorry for my bad english. ^^'

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 * ===============================================

Reply by email

silvioprog
to Leonardo M. Ramé

2011/6/9 Leonardo M. Ram? :

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/

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 * ===============================================

Reply by email