kylewolfe — 2012-11-16T15:57:32-05:00 — #1
So thinking through a possible common situation I'll be running into shortly. Can / should I use fopen() directly on $_POST after a validation has been run to manipulate a CSV file that I plan on inserting into a table or should I move it to the file system first?
scallioxtx — 2012-11-16T16:16:50-05:00 — #2
Not sure what you're asking here. fopen is used to open files on the filesystem. Since $_POST is not a file, you can not use fopen on it.
cpradio — 2012-11-17T06:36:04-05:00 — #3
You could however use it on $_FILES, but I typically move the file locally (out of the temp folder) before working with it.
anthonysterling — 2012-11-17T07:37:15-05:00 — #4
Not strictly true...
$post = fopen('php://input');