Hi everyone
im trying to use fopen and getting php_hostconnect: connect failed and Bad file descriptor errors... anybody know any possible reasons why? I've searched around and have been unable to find any real info that solves this.
Code follows:
$location = "ftp://user:pass@domain.com/home/html/test.txt";
if ($fp = fopen ($location, "w")) {
fputs ($fp, "hello world");
$fp = fclose ($location);
}else{
// Could not create page
echo "fopen failed.";
}
TIA