<?PHP
$ftp= ftp_connect("ug.gnagna.org");
if(!ftp_login($ftp,"**","**")){
print " error while loggin into FTP " ;
exit;
}else{
if(!ftp_chdir($ftp,"/www/FTP/pics")){
print " error while changing dir " ;
exit;
}
stripslashes($picture) ;
$file = substr( strrchr( $picture, "/" ), 1 );
$put_thingy = $current_dir . "/" . $file;
$upload = ftp_put($ftp, $put_thingy, $picture, FTP_BINARY);
if($upload){
print " file uploaded sucesfully " ;
exit;
}
}
ftp_quit($ftp);
?>
I use this to select the picture needed to be uploaded :
<form action=test.php>
<input type=file name=picture>
<input type=submit>
</form>
i always get the error that the script cant locate the file, what could be causing this ?
thank you