php exec、passthru 函数在主机上禁用时可以解决

发布于 2024-08-18 18:06:47 字数 162 浏览 1 评论 0原文

我的网站是基于 php 的,主机禁用了 exec()、passthru() 和 system()。我有一个需要这些功能的脚本。有什么解决方法吗?

我的脚本运行的命令很简单 mysqldump 来备份我的数据库。如果没有解决方法来使用这些功能。有没有其他方法可以在不需要使用它们的情况下进行备份?

My site is php based and the host disabled exec() and passthru() and system(). I have a script that needs these functions. Is there any work arounds?

The commands my script to run is simple mysqldump to backup my database. If there's no work arounds to use those functions. Is there another way to do the backup without the need to use them ?

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

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

发布评论

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

评论(3

黎歌 2024-08-25 18:06:47

我认为你的主机不会无缘无故地禁用 exec() 。如果你找到办法做到这一点,
他们可能会尽力关闭它,和/或关闭您的帐户。

I think your host does not disabled exec() without a reason. If you find a way to do it,
they'll likely do their best to close it, and/or close your account.

情魔剑神 2024-08-25 18:06:47

不,它们被禁用是为了防止安全漏洞。能够规避这些破坏了禁用它们的全部目的

No, they were made disableable to prevent security leaks. Being able to circumvent these undermines the whole purpous of disabling them

青瓷清茶倾城歌 2024-08-25 18:06:47

备份 MySQL 数据库的一个简单的解决方案是使用 SELECT ... INTO OUTFILE 和 LOAD DATA INFILE ... 。它们不会解决您的所有问题,但当您无法运行 shell 命令时,它是一个快捷方式。

A naive solution for backing up MySQL DBs is to use SELECT ... INTO OUTFILE and LOAD DATA INFILE .... They won't solve all your problems, but it's a shortcut when you can't run shell commands.

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