Hi Al,

Tuesday, May 22, 2007, 4:19:22 PM, you wrote:

> I know that; but, I writing a script, that can be used on different
> servers, which creates a directory and I want to 
> make certain it is created on the DOC ROOT.  I don't want the user
> to have to test the ftp connection with a ftp utility 
> program first.


I'd have to say 'impossible'. This value isn't stored in any one
variable or even in a system value you can rely on.

For example you could probably extract the FTP home directory of a
given user on a Unix system with a bit less pain than on a Windows
server, but within IIS which managers FTP on Windows, you'd have to
query the IIS service itself (via its COM object) to find out the home
dir of a user, which will (and can) vary per user, assuming they even
have one set.

That doesn't even begin to cover all the various other FTP Servers out
there, such as ServU, GlobalScape, TitanFTP, FileZilla Server,
SurgeFTP, etc, etc. Each one holds its users root directories in
different ways, and you'd need to know them *all*. Some hold them in
ini files, some in xml, some in the registry, some in custom binary
formats. You get the idea.

Like I said, I think you're heading into 'impossible' territory here.
Find another way to achieve the same end result.

Cheers,

Rich
-- 
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to