I'm trying to chmod a file onthe ftp site I store my files on.
I'm using this bit of code [it's not ftp_chmod ();) because that function kept returning "Call to undefined function: ftp_chmod ()" for some reason but if anyone know an answer for that problem there's no need to solve this one here].
Code: Select all
<?php
$ftp_ip="ftp.dur.ac.uk";
$ftp_login="my user name";
$ftp_pass="my password";
$ftp_file="public_html/test.txt";
$conn_id=ftp_connect($ftp_ip);
$login_result=@ftp_login($conn_id, $ftp_login, $ftp_pass);
$chmod_cmd="CHMOD 0644 ".$ftp_file;
$chmod=ftp_site($conn_id, $chmod_cmd);
ftp_quit($conn_id);
?>Any idea how to get this to work? (or just how to get ftp_chmod to work even?)Warning: ftp_site(): SITE command not implemented. in /home/hudson/ug/d11wtq/public_html/chmod.php on line 12
Thanks guys