Do you have a question? Post it now! No Registration Necessary. Now with pictures!
October 13, 2010, 1:44 am
rate this thread
per the documentation: php://memory and php://temp are both listed
under "Allows Appending"
what am I missing / what's the point?
They only seem to work with read/write modes such as
closing the handle, or trying to open another handle without closing
the first essentially erase the contents... so what's the point of
a) be appending nothing,
b) no way to read what you just wrote?
sure would be nice if you could
$fh = fopen('php://memory', 'w');
fwrite($fh, 'test string');
$fh = fopen('php://memory', 'r');
$result = fgets($fh,2048);
Re: php://memory and php://temp
These are temporary "files" - as soon as they are closed, they go away,
as you note. So it really doesn't make any sense to open them other
than for read/write.
Other options are there - but those are just standard options for any
file. It doesn't mean you need to use them.
Remove the "x" from my email address
JDS Computer Training Corp.