Session Variable and File handler in php4
| From: | Ruth Liu | Date: | Thu, 30 Mar 2000 01:28:20 +0000 |
| Subject: | Session Variable and File handler in php4 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17375@lists.php.net to get a copy of this message | ||
All,
In my first php file (test1.php):
<?
session_start();
$fp = fsockopen(myip, myport,&$errno, &$errstr);
echo "Write socket handler:".$fp . "<br>";
$my_test="Just a test";
session_register("fp");
session_register("my_test");
?>
In my second php file (test2.php):
<?
session_start();
echo "Read socket handler:".$fp . "<br>";
echo $my_test."<br>";
?>
From test1.php, I got
Write socket handler:Resource id #1
From test2.php, I got
Read socket handler:0
Just a test
My questions are
1. why fsockopen() doesn't return integer?
2. why I get 0 instead of (at least) "Resource id #1"?
Thanks