opendir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So that I could use the opendir feature with an ftp url, I downloaded php-5.0.3 and used the following to make the cgi version:
./configure --enable-ftp
make
cp ./sapi/cgi/php /root


Here is my script:
----start of script /root/z.php----
#!/root/php
<?php
if ($handle = opendir('ftp://login:password@xxxxxxxxxxxxxxx/SHARE1/')) {
  echo "Directory handle: $handle\n";
  echo "Files:\n";
  while (false !== ($file = readdir($handle))) {
    echo "$file\n";
  }
  closedir($handle);
}
?>
----end of script----

When I run the script, I get the following error. I am root doing this and can ftp normally into the server with ncftp. I have another script (shell script /bin/sh) that I have been doing ftp with, but want some added features that php 5.0.3 will allow.
----start z.php output-----
# /root/z.php
Content-type: text/html
X-Powered-By: PHP/5.0.3


<br />
<b>Warning</b>: opendir(ftp://...@xxxxxxxxxxxxxxx/SHARE1/) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: not implemented in <b>/root/z.php</b> on line <b>3</b><br />
----end z.php output----


Any help in this would be greatly appreciated. I really would like to get this running. I am assuming that there is a compile option that I need to add.

Thanks
Steve

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux