Thenayr
Thenayr

Reputation: 55

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 with 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.

Upvotes: 1

Views: 393

Answers (2)

Dutchie432
Dutchie432

Reputation: 29170

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.

Upvotes: 0

aefxx
aefxx

Reputation: 25279

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.

Upvotes: 3

Related Questions