TheGoldenShogun
May 1st, 2003, 08:50 AM
ok I did this.
$my_temp_file = tmpfile();
ftp_fget($ftp_stream, $tmp_file, $todays_filename, FTP_ASCII);
basically what im trying to do is go to an FTP site where we upload things daily and check whether that file for today is there. if so I'm reading it into a tmpfile, from there I want to take the stuff from that tmpfile and append it to the file i'm about to upload.
I hope that makes sense, basically I'm running into an error here.
$dumped_info = fread($tmp_file, filesize($tmp_file));
the problem is that in order to read the tmp_file I need to specify how much of it I want to ready (the second parameter of fread). most of the times I just do a filesize($filename) thing for the second parameter but the $tmp_file is a resource, how can I get the string path of that temp file so I can supply it into my filesize function?
Thanks
:cool:
$my_temp_file = tmpfile();
ftp_fget($ftp_stream, $tmp_file, $todays_filename, FTP_ASCII);
basically what im trying to do is go to an FTP site where we upload things daily and check whether that file for today is there. if so I'm reading it into a tmpfile, from there I want to take the stuff from that tmpfile and append it to the file i'm about to upload.
I hope that makes sense, basically I'm running into an error here.
$dumped_info = fread($tmp_file, filesize($tmp_file));
the problem is that in order to read the tmp_file I need to specify how much of it I want to ready (the second parameter of fread). most of the times I just do a filesize($filename) thing for the second parameter but the $tmp_file is a resource, how can I get the string path of that temp file so I can supply it into my filesize function?
Thanks
:cool: