Hi!
How may I maintain an object in more than one script? As soon as I want to use an object in more than one script, I have this problem that I don´t know how to transmit this object to other scripts.
Thanks
How may I use the same object in more than 1 script?
Moderator: General Moderators
Passing Instances?
Are you asking if you can pass instances of objects from one page to another?
When you say "object" are you speaking of an already instantiated entity? Remember, there is a subtle difference between class and object. A class becomes an object when it is instantiated.
That said, it's no problem to include and use the same class in each of your scripts by just including the code for it with a include() or require() function or construct. On the other hand, if what you want is some free running object that each of your scripts can interface with when they're run, you need to take a look at something like SRM or create a php sandbox of some sort.
Cheers,
BDKR
That said, it's no problem to include and use the same class in each of your scripts by just including the code for it with a include() or require() function or construct. On the other hand, if what you want is some free running object that each of your scripts can interface with when they're run, you need to take a look at something like SRM or create a php sandbox of some sort.
Cheers,
BDKR