View Full Version : ftp_puts

01-02-2006, 09:28 AM
Hey, im writing an update script using ftp but ftp_puts, ftp_fputs ect will return false.

here is the code

$file_from = "";
$mode = "FTP_ASCII";
if ( $file_handle = fopen($file_from, "r") )
if ( ftp_fput($ftp, "index.php", $file_handle, $mode) )
echo "<font color='green'>Success</font>";
echo "<font color='red'>Failed</font>";
echo "<font color='red'>Could not open remote file</font>";

It can open the file but cannot upload it

01-02-2006, 10:08 AM
You seem to be mixing things up, take a look at:
does it help?

01-02-2006, 11:43 AM
EDIT: The problem seems to be the $mode
You have to type FTP_ASCII into the code, using a variable will not work.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum