![]() |
Question regarding fwrite(), filesize(), binary stream
I have the stream of the binary data. I need to use some file
associated function with it. For example filesize(), imagesize() etc. At the moment, I write this data stream into a tmp file fwrite('/tmp/tempfile', 'x+'), do the file functions, then unlink() it. It surely is not an elegant way to do, let along a good portability way. Is there a way to create a file in the memory from the data stream? or even use file functions without first write the stream into a file? Thanks. |
To get information about a file, without saving it to a permanent directory:
PHP Code:
PHP Code:
|
Quote:
Unfortunately this data stream does not come from a uploaded file. It is actually from decoded mime/uuencoded message. May be I can find the temp directory enviroment within the script. |
I have found you can actually write to $_FILES.:)
Also to find out the temp direcotory. The following code should help: if (!$tmp_dir = get_cfg_var('upload_tmp_dir')) { $tmp_dir = dirname(tempnam('', '')); } |
All times are GMT. The time now is 06:22 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|