dazzer12345 Posted November 13, 2009 Share Posted November 13, 2009 Hello, Im trying to write to a file on an ftp server. I can login ok. I can write to the temp file I can send the temp file to the server ok.it shows up. but the text i wrote to the file 'test' is not there. its an empty fileany ideas.also i have used fopen but i could not get that to work on my particular ftp server (but did when calling the script form localhost) so im trying this way as a work around. $ftpstream = @ftp_connect($filetodomain); $login = @ftp_login($ftpstream, $filetouser,$filetopassword); $temp = tmpfile(); fwrite ($temp, "test"); fputs($temp,'test'); @ftp_fput($ftpstream, "//temp//"."cool10.txt" , $temp, FTP_ASCII); fclose($temp); ftp_close($ftpstream); thanku Link to comment https://forums.phpfreaks.com/topic/181331-ftp-write-file/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.