Featured Post

Full CSS Versus Table based layout

I think this is one of the biggest technical issues affecting many web designers at the moment. Many designers (probably most) have now switched over to full CSS design, also known as CSS-P. Its potential advantages are a more useable, flexible and compliant design, however from my experience this isn’t...

Read More

Using a remotely hosted PHP include file

Posted by Voodoochilli | Posted in Development | Posted on 17-02-2007

Tags: ,

1

Well here is something I was sure was impossible until the other day. I managed to use a remotely hosted include file in one of my pages. The reason I did this was because all of the coding needed to connect to a database on another site. I think the only reason it worked though is because although the code was on another site, it is on the same server. Still, it worked for me!

Comments (1)

Using remote files are aloud you just need to use a wrapper(see previous blog entry).
However,
A remote file may be processed at the remote server (depending on the file extension and if the remote server runs PHP or not) but it still has to produce a valid PHP script because it will be processed at the local server. If the file from the remote server should be processed there and outputted only, readfile() is a much better function to use. Otherwise, special care should be taken to secure the remote script to produce a valid and desired code.

Write a comment