Re: PHP, C++, and LAN

From: Date: Wed, 01 Aug 2001 19:52:24 +0000
Subject: Re: PHP, C++, and LAN
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60765@lists.php.net to get a copy of this message
Why doesn't $dir = opendir("//harp/graphics/"); work anyway? Is this an oversite in the Win32 development of PHP? You're able to do this in Perl. "Keith Jeffery" <jeff2619@uidaho.edu> wrote in message news:20010801143214.28955.qmail@pb1.pair.com... > Hello, > 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 > jeff2619@uidaho.edu > >

« previous php.general (#60765) next »