Having resource variables over several scripts

From: Date: Mon, 10 Oct 2005 15:03:07 +0000
Subject: Having resource variables over several scripts
Groups: php.general 
Request: Send a blank email to php-general+get-223822@lists.php.net to get a copy of this message
Hey, I am trying to have e.g. a file opened over several scripts. When opening a file with "fopen" I receive a variable of the type resource (like "Resource ID #3"), but when I try to save this variable in the SESSION and try to use it on another page, I get a "null" variable. Because I need to have the same and exact resource (not opened every time I load a new page) and since it is apparently not possible to store it in a session, I wanted to ask if somebody had the same issue once, and maybe there is some help out there. Could I somehow serialize the resource, then give it to another page via GET or POST? I would really appreciate if somebody has some hints... Thanks, benni. -SDG-

« previous php.general (#223822) next »