01/07/05 01:19
>>69 レスありがと。
あきらめきれずこんなテストコード書いたらちゃんとカウントアプしてくれた。
<?php
class testFoo {
var $count;
function testFoo($i) {
$this->count = $i;
}
function inc() {
$this->count++;
}
function hello() {
$this->inc();;
echo("hello, " . $this->count . " times.\n");
}
}
session_start();
if (!isset($obj)) {
$obj = new testFoo(0);
session_register("obj");
}
?>
<html>
<h1>
<?php $obj->hello(); ?>
</h1>
</html>
/tmp覗いたら
obj|O:7:"testfoo":1:{s:5:"count";i:3;}
となんとなくシリアライズしてくれてる風味。