Keeping file pointers open after script end

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is there any way to keep a file pointer open after script is finished,
so that it can be access later, by passing it through session?

Like this:

page1.php:

<?php
session_start();

$fp = fopen("test.php","r");
$data = fread($fp,10);
$_SESSION['fp'] = $fp;

echo "<a href='page2.php'>Continue</a>";
?>

page2.php:

<?php
session_start();
$fp = $_SESSION['fp'];
$data = fread($fp,10); // Should be bytes 11-20
?>

Thanks,

Tijnema

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux