This is a best practice type question. I'm dealing with two different frameworks. When I execute a piece of code from one framework on the page of another framework, I'm getting a code conflict. What I'm wondering is how to execute a piece of code on a separate web page and bring in the results AFTER the php on that page has executed and produced its HTML.
One Possible Solution
Use Curl - I could house the additional code on a curl page and bring it in that way, but that seems to have a lot of overhead associated with it.
Is there a lower overhead way of doing this than using curl?
More info
Specifically in this case I'm trying to use a magento php script in my page, and the autoloader is trying to load in other scripts 开发者_StackOverflowin the directory that should not be auto loaded.
Resolve the 'conflict' by wrapping the library code in an class where you define the interface. Then call that class directly.
Adding a server side request to another resource will extend the time each request takes (remember the second request has to fire up a database connection, load the framework, carry out a db query etc).
精彩评论