Re: possible to "move_uploaded_file" to a variable instead a file?
| From: | Larry Garfield | Date: | Sun, 17 Jun 2007 23:38:42 +0000 |
| Subject: | Re: possible to "move_uploaded_file" to a variable instead a file? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257244@lists.php.net to get a copy of this message | ||
I believe you can just fopen() and friends the file directly out of /tmp, or
wherever the file gets put. Just read the file itself into a string and have
your way with it. PHP will delete the temp file for you when the script
ends.
On Sunday 17 June 2007, Mark wrote:
> hey,
>
> i
m wondering if its possible to move a uploaded file inside a
> variable.
> i would like to know this because i`m currently writing a database backup
> script and in there the user uploads a sql file that gets executed. now i
> _dont_ want the file to be stored on the server!! simply because
> thats
> not safe. however i do want to store it inside a variable and than run the
> database query.
>
> any idea`s on this?
>
> Thanx alot in favor,
> Mark
--
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson