<?php
error_reporting(E_ALL);
var_dump(scandir('ftp://user:pass@host:21/public_html/'));
Works on my localhost WAMP server but it doesn't seem to work on my school server (Apache/2.4.6, PHP/5.4.24 on Slackware)
It throws the following error:
root@darkstar:/var/www/codedit/www# php test.php
PHP Warning: scandir(ftp://...@alpha.hosttox.com/public_html/): failed to open dir: not implemented in /hdd/hdd11/www/codedit/www/test.php on line 4
PHP Warning: scandir(): (errno 25): Inappropriate ioctl for device in /hdd/hdd11/www/codedit/www/test.php on line 4
bool(false)
However, I successfully log into the ftp server when using the built-in PHP functions (ftp_connect,ftp_login,etc)
Any ideas would be much appreciated.