Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-10-2008, 10:32 PM #1
- Join Date
- May 2006
- Thanked 0 Times in 0 Posts
php include using files from another server
I use includes all the time within my php files. The problem I am having is that I want to do an include of a file that on another server (different domain), and it doesn't seem to let me. Is there something I need to do on my end, or something that the remote server manager needs to do, or both?
Help is greatly appreciated. Thank you.
12-11-2008, 12:44 AM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
Read this from the manual:
Also check this link out, it contains an example that may be a better option for your purposes:If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), you can specify the file to be included using a URL (via HTTP or other supported wrapper - see List of Supported Protocols/Wrappers for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script.