I'm writing some PHP scripts that will only be used over our local
Windows NT/2000 network.  I've written a directory browser in PHP, but that
only sees the server's local directories/files whereas I would also like to
be able to see shared network directories.  Since the PHP directory
functions don't allow network connections (i.e. //harp/graphics/) I decided
that a good workaround would be to write a C++ program that listed the
directories and files (like dir or ls if you're on Unix, and I can't get dir
to work through a PHP exec command), and then I would parse the output in
PHP.  I've since written two different C++ programs to do this, one using
findfirst and findnext, and other using opendir and readdir.  They both work
by specifying the directory to be listed after the program (i.e.
"listFiles.exe d:/" or "listFiles.exe //harp/graphics/").  Both of these
programs work just as expected from the command prompt, working with both
directories local to the server and those on a shared network drive.
However, both of these programs fail using any PHP system command (exec,
passthru, system) when specifying a network drive as the arguement, although
both work when a server's local directory is given.  For some reason it can
no longer read the network drive when run through PHP.  I've double and
triple checked the arguements passed, and they command issused is exactly
that given at the command prompt.  I've even tried changing the current
working directory in the C++ program and to no avail.  Does anybody have any
insight, or perhaps another route down which to travel?  I will happily
provide PHP and/or C++ code for what I'm doing.

Thank you,
Keith Jeffery

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to