jakebur01 Posted January 12, 2009 Share Posted January 12, 2009 I am getting an unexpected t_string near the fput line. $fp = fopen($source_file, 'r'); $ftp_server = 'ip'; $ftp_port = '21'; $ftpUser = "user"; $ftpPass = "pass"; $ftp_connect = ftp_connect($ftp_server,$ftp_port); ftp_login($ftp_connect, $ftpUser, $ftpPass); ftp_chdir($ftp_connect, "/u/ssc/price/") ftp_fput($ftp_connect, $filename, $fp); ftp_close($ftp_connect); Link to comment https://forums.phpfreaks.com/topic/140523-unexpected-t_string-in-ftp/ Share on other sites More sharing options...
premiso Posted January 12, 2009 Share Posted January 12, 2009 You need a semi colon after this line: ftp_chdir($ftp_connect, "/u/ssc/price/"); Link to comment https://forums.phpfreaks.com/topic/140523-unexpected-t_string-in-ftp/#findComment-735370 Share on other sites More sharing options...
bluesoul Posted January 12, 2009 Share Posted January 12, 2009 Premiso beat me to the punch. Anytime something says unexpected T_STRING, T_ECHO, or what have you, start counting brackets, commas and semicolons. Link to comment https://forums.phpfreaks.com/topic/140523-unexpected-t_string-in-ftp/#findComment-735371 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.