when using function ftp_put()
of php to upload file to an ftp, it actually uploads the file, but it arrives without weight, that is 0 B, I attach the code that I am using (it is not problem of permissions of the folder where I'm sending it, the file comes from a form and I pick it up in the php)
$c = ftp_connect('miftp.com') or die("error al conectar");
ftp_login($c, 'miuser', 'pass') or die("no logueo");
$fichero = fopen($_FILES['sArchivo']['name'];
$remote = "/carpeta/".$_FILES['sArchivo']['name'];
ftp_put($c, $remote, $fichero , FTP_bynary) or die("Can't transfer");
this is the form:
<form action="../ajax/producto-checkfile.php" method="post" enctype="multipart/form-data">
<div>
<label for="upload">Selecciona un fichero</label>
<input name="sArchivo" type="file" />
<input type="submit" name="submit" value="Enviar" />
</div>
</form>