this script used to upload files to the server without any issue:
$oFTPConn = ftp_connect($sF tpServer,21,600 ) or die("Unable to connect ot
$sFTPServer!"); //login to the ftp server and upload the file //
$iFtpTimeOut = ftp_set_option( $oFTPConn, FTP_TIMEOUT_SEC , 600);
$cmdLogin = ftp_login($oFTP Conn, $sFtpUserName, $sFtpPassWord) or
die("Unable to connect to login to the FTP server: $sFTPServer!");
$cmdUpload = ftp_put($oFTPCo nn, $sFullDestinati onPath, $_POST['srcFile'],
FTP_BINARY);
if ($cmdUpload != FTP_FINISHED){
echo("There was an error uploading the file...");
}
$cmdCloseFTP = ftp_close($oFTP Conn);
since the host company upgraded to php5, it appears to upload the files, but
they're always 1kb large? any idea what's going wrong?
$oFTPConn = ftp_connect($sF tpServer,21,600 ) or die("Unable to connect ot
$sFTPServer!"); //login to the ftp server and upload the file //
$iFtpTimeOut = ftp_set_option( $oFTPConn, FTP_TIMEOUT_SEC , 600);
$cmdLogin = ftp_login($oFTP Conn, $sFtpUserName, $sFtpPassWord) or
die("Unable to connect to login to the FTP server: $sFTPServer!");
$cmdUpload = ftp_put($oFTPCo nn, $sFullDestinati onPath, $_POST['srcFile'],
FTP_BINARY);
if ($cmdUpload != FTP_FINISHED){
echo("There was an error uploading the file...");
}
$cmdCloseFTP = ftp_close($oFTP Conn);
since the host company upgraded to php5, it appears to upload the files, but
they're always 1kb large? any idea what's going wrong?
Comment