...

View Full Version : How to include file from different server



deva.vvel
07-12-2007, 06:00 AM
Hi,

I have a file named file1.php in server 1,
and another file named file2.php in server 2, I wish to include file1.php in the file file2.php. How can i do this?

deva

Fumigator
07-12-2007, 07:06 AM
For security reasons this isn't possible. Otherwise I could easily read any site's PHP code and get all kinds of neato highly sensitive info.

EDIT: That's not entirely true, I forgot about the whole http wrapper thing and the ability to "sort of" include remote PHP files. It's more like you can pass variables to the remote PHP file and get the return value from that file but it's not the same as a normal include.

Read this page for the details:

http://us2.php.net/manual/en/function.include.php

deva.vvel
07-13-2007, 05:39 AM
Thanks fumigator.. it helped me a lot..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum