
October 26th, 2004, 03:38 PM
|
|
Contributing User
|
|
Join Date: Jun 2004
Posts: 32
Time spent in forums: 2 h 53 m 17 sec
Reputation Power: 5
|
|
|
session problem
I am trying to open a named pipe and saving the file pointer using a session variable. However, while other session variable seem to be saved just fine, the session variable for the file pointer doesn't get saved.
PHP Code:
if (($_SESSION['Pipe_open'] == 0 )) { if ( !( $_SESSION['Pipe_fp'] = fopen("/Users/administrator/Sites/maps/PipeFile","w") ) ) echo "ERROR :: Can't open PipeFile<br>"; else $_SESSION['Pipe_open'] = 1; } $Pipe_fp_check = $_SESSION['Pipe_fp']; if ( !($Pipe_fp_check) ) echo "Error :: pipe not open<br>";
The first time around, the pipe gets opened and everything checks out fine. The next time around, it doesn't re-open the pipe, but the Pipe_fp session variable is not set anymore.
Can anyone help? Thanks a million
-sharyn
|