FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php://memory and php://temp
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
php://memory and php://temp [message #170151] Wed, 13 October 2010 01:44 Go to previous message
BKDotCom is currently offline  BKDotCom
Messages: 7
Registered: October 2010
Karma:
Junior Member
http://php.net/manual/en/wrappers.php.php
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
fopen('php://memory','rw');

closing the handle, or trying to open another handle without closing
the first essentially erase the contents... so what's the point of
fopen('php://memory','a') ?
you'll
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');
fclose($fh);

$fh = fopen('php://memory', 'r');
$result = fgets($fh,2048);
fclose($fh);
echo $result;
[Message index]
 
Read Message
Read Message
Previous Topic: Adding MSSQL support to a MySQL/Postgres script
Next Topic: problem with session cleanup
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 06:50:37 GMT 2024

Total time taken to generate the page: 0.04206 seconds