Newbee question: Handing object from one php to another

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
KarlK
Forum Newbie
Posts: 3
Joined: Tue May 27, 2008 4:01 pm

Newbee question: Handing object from one php to another

Post by KarlK »

Hi, I have a PHP class and two PHP files using this class. I run each of the PHP files in a different browser window . Is it possible to instantiate an object wit the first PHP and hand it over to the second upon call? Are there other ways of object communication? Does anybody know good links where I can read more about this subject?

Karl
User avatar
vargadanis
Forum Contributor
Posts: 158
Joined: Sun Jun 01, 2008 3:48 am
Contact:

Re: Newbee question: Handing object from one php to another

Post by vargadanis »

I think what you want is way too tricky but not impossible. I guess the 2 browser windows are supposed to be 2 computers. If you want to establish communication between 2 computers with PHP (chat) than the best way to go is using temporary tables in a database. Of course it could be done by reading and writing to a file but not the best way to go.
Post Reply