开发者

Include a local "external" php/html file using php

I'll try and word this as sensibly as possible.

I have two dedicated servers that are networked together wi开发者_StackOverflow社区th local IP's (10.1.2.1 / 10.1.2.2). Basically I need to be able to include files (php scripts/html/etc.) interchangeably from either server, but without the risk of allowing external scripts to be run.

Is this possible?

Running CentOS 5 on both servers with full root access.


Why not mutually mount the other server's drive and set PHP's include_path ini-setting accordingly. This way you can safely include remote files without worrying about the usual attack vectors.


If both machines are networked, you could always create a virtual directory on the main web server that points to the network drive with the secondary PHP files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜