/ Published in: PHP
Expand |
Embed | Plain Text
<?php // classa.inc: class A { public $one = 1; public function show_one() { } } // page1.php: include("classa.inc"); $a = new A; // store $s somewhere where page2.php can find it. file_put_contents('store', $s); // page2.php: // this is needed for the unserialize to work properly. include("classa.inc"); // now use the function show_one() of the $a object. $a->show_one(); ?>
You need to login to post a comment.
