Can anyone tell me why the following code won't work when I call it through
Apache, but it DOES work when I do it in a Command Prompt?
 
It gives me 0 when I run it through Apache. I'm have PHP set up to run as
CGI. PHP 4.0.6 w/ latest 4.0.7-dev snapshot on top.
 
What I'm going to end up doing is copying the files from an UNC path over to
the local server (running PHP), but I can't get anything to work with UNC
paths when called through Apache, not even a system call to "move".  But
everything always works in a Command Prompt.  If you can think of another
way I could do this on demand, I would greatly appreciate it, as this is
driving me crazy!
 
<?
if ($dir = @opendir("//workstation//test")) { 
  while($file = readdir($dir)) {
    if ($file !="." && $file !="..")
       $arFiles[] = $file;
    }
  }
    ?>
File_Array Count: <? $asize = sizeof($arFiles);
print $asize;  ?>
 
Thanks,
Shawn Sellars

Reply via email to