Ok, I have a script:
($ftp_server, $ftp_user, and $ftp_pass are defined.)
#!/Library/Php4/lib/php
<?php
print "This the Ftp.php script/n";
// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
// try to login
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected as $ftp_user@$ftp_server\n";
@ftp_chdir($conn_id, "aps");
}
else
{
echo "Couldn't connect as $ftp_user\n";
?>
}
That I'm trying to run from the command line. I get permission denied errors whenever I try to run it. It runs fine from a web browser. I've already chmoded it to make it executable and the directory it is in also. My question is how do I figure out which permissions to fix? Both the directory and the file had the following command run chmod 777. Also the command ./ what does that mean? I'm assuming that when I type ./ftp.php that I'm running the ftp.php script. Any help is appreciated.