Believe me, I'm not doing it on purpose. I'm trying to get two different
script packages to play nice with each other and I want to keep the
modifications at a minumum to make it easier to update the software.
Specificaly I'm talking about a weblog package (phpslash) and forums package
(phpbb), as well as a shopping cart (phpshop), initialy... maybe others as
the class name problem isnt that bad, really. But there's global variables
as well that need to be isolated. get/post vars, session vars, etc.
My idea is to isolate each script, pass in the global vars that it expects
to see. The overall, "parent" script would keep the variables for all the
scripts under different names that dont conflict, converting them on entry
to each script.
"Michael Virnstein" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> why do you have more than one class with the same name?
> would be easier using different names for different classes.
> or define a base class template
> and extend it in the files as desired, but give them unique names.
> how do you know later, which class does what in which way, when they have
> the same
> name. not very good imo.
> "Aric Caley" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Is it possible to keep the variable name-space separate between, say,
> > files (one included into the other) to avoid name collisions? I'm
> > get two scripts to work together on the same page. Each script defines
> > classes that have the same names but work differently (ex., class
> > All I need is to embed the output of one script into the other.
> > Now, I could do this by just getting the output from a URL but that
> > really inefficient. Or I could run the script from the CGI version of
> > using exec() but that also seems like it could be really slow and
> > Is there some efficient way of doing this?
> > It would be cool if you could just put the include() inside of a
> > and have all the classes and variable names be local inside that
> > but that didnt seem to work... plus the scripts explicitly access
> > variable names.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php