Hey all you php gurus!I need some direction in figuring out a problem. I want to make a php/html page that allows me to click a button for a certain row in a dynamic table (each row will have this button) and when I click the button, it will open a new text file, and write to it the comma separated values for each column in the database that pertain to that row, and then ftp that file to an external server.Does anyone have knowledge as to how I might go about doing this. I know I have to use php's ftp function set, but I cant figure out how do the the file creation, because I dont really want to save the text file anywhere, but just create it and ftp it, and after that, I could care less that it exists, and would prefer that it didnt get saved because that will just take up space.Thanks!!
1/31/2006 9:32:21 AM
save, ftp, delete?that's the easy solution.
1/31/2006 11:51:43 AM
You really need to use your filestream functions.fopen a new filewrite the content to itopen ftp streamfput the file handleclose ftp streamfclose the fileunlink the file.It should be done like for a number of security and data integrity reasons.
1/31/2006 1:15:24 PM
cool... that is the pattern I was looking for, but just wasnt sure if it could be done successfully without saving the file somewhere.I guess if you just use the same file name over and over and keep opening it as an empty file though, it should be fine this way, right?
1/31/2006 3:13:34 PM