包括本地“外部”使用 php 的 php/html 文件

发布于 2024-10-03 05:25:52 字数 187 浏览 1 评论 0原文

我会尝试尽可能明智地表达这一点。

我有两台与本地 IP (10.1.2.1 / 10.1.2.2) 连接在一起的专用服务器。基本上我需要能够从任一服务器互换地包含文件(php 脚本/html/等),但不存在允许运行外部脚本的风险。

这可能吗?

在两台具有完全 root 访问权限的服务器上运行 CentOS 5。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小…楫夜泊 2024-10-10 05:25:52

为什么不相互挂载其他服务器的驱动器并相应地设置 PHP 的 include_path ini 设置。这样您就可以安全地包含远程文件,而不必担心常见的攻击媒介。

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.

自由如风 2024-10-10 05:25:52

如果两台计算机都已联网,您始终可以在主 Web 服务器上创建一个虚拟目录,该目录指向包含辅助 PHP 文件的网络驱动器。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文