is session_register able to handle objects?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jx2
    New Member
    • Feb 2007
    • 228

    is session_register able to handle objects?

    whats wrong with that:
    PHP code:[PHP]
    <?php;

    if(!$Tour){$Tou r= new tournament();se ssion_register( "Tour");}
    $Tour->echodouble() ;
    class tournament
    {
    var $nr,$TF; //$TF - keep files' paths

    function echodouble(){
    $file=$this->$TF[$this->$nr++];
    echo"<A HREF=$PHP_SELF? page=pokaz&dir= $dir&c=$file > <img src=p/$dir/mini/$file ></a>";
    $file=$this->$TF[$this->$nr++];
    echo"<A HREF=$PHP_SELF? page=pokaz&dir= $dir&c=$file > <img src=p/$dir/mini/$file ></a>";
    }

    function tournament(){
    $dir='p/filip';
    $dp=opendir($di r);
    while($file=rea ddir($dp)) $TFile[]="$dir/$file";
    $this->$TF=$Tfile;
    $this->$nr=0;
    }
    }
    [/PHP]
    and i get this error :
    Warning: session_registe r(): Cannot send session cookie - headers already sent by (output started at /photoforyou/tournament.php: 1) in /photoforyou/tournament.php on line 3

    whats wrong?
  • jx2
    New Member
    • Feb 2007
    • 228

    #2
    thanks a lot every1 ive found the solution:-)

    Comment

    Working...