[solved] Need help with php ftp functions
Posted: Sat Sep 29, 2007 5:34 am
Hi everyone,
This is my first time trying to upload something with php through ftp. The idea is to upload a certain string to a new file and this is my current code:
I am certain that the variable $file contains a value, but still the uploaded file is blank! what am i doing wrong?
This is my first time trying to upload something with php through ftp. The idea is to upload a certain string to a new file and this is my current code:
Code: Select all
// FTP connection is set up here -- \\
$tempfile = tmpfile();
fwrite( $tempfile, $file );
ftp_fput( $this->ftph, $this->conf['ftp']['tdir'] . $file_name, $tempfile, FTP_ASCII );
fclose( $tempfile );