On Mon, 23 Dec 2002, Luke Sneeringer wrote: > That doesn't seem to work. This might be because my require tags also > send variables (e.g. common.php?variable=1)--would this make a call to > a non-PHP extention file fail?
You've already demonstrated that you know included code inherits the parent's variables at the scope where require() is called ... so I'll leave it up to you to determine whether or not the "?variable=1" is necessary. I dont' know if it breaks require(), but I doubt it. Here's the trick: visit the URL of the require()'d code with a web browser. If you don't see /code/, then your require() won't work. If you do see the php code ... all of it, including the start & end tags ... in plain text, then you're on the right track; your code should be able to be included into the parent. You're trying to include /code/ into some parent code, so you don't want the processed result of the PHP script (unless it's more PHP code). If this doesn't get you closer, post a simple example of what you're trying to do. I routinely include PHP across domains for various reasons ... I know it works, and works well ... it will for you too, I hope! hth, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php