如何将特定的 PHP 函数添加到我的服务器的 PHP 安装中

发布于 2024-10-09 06:38:04 字数 224 浏览 0 评论 0原文

我当前运行的是 PHP 版本 5.1.6,但我有一个应用程序大量使用 json_encodejson_decode 函数,因此,我想添加将这些函数添加到我的服务器的 PHP 安装中(因为这些函数仅随 PHP 版本 PHP 5.2 + 一起提供)

执行此操作的最佳方法是什么。我对整个终端方法不太失望,所以如果有另一种方法那就太好了

提前非常感谢

I am running PHP version 5.1.6 currently, but I would have an application which makes pretty heavy use of the json_encode and json_decode functions, as such, I would like to add these functions to my server's install of PHP (as these functions only ship with PHP versions PHP 5.2 +)

What is the best way of doing this. I'm not too down with the whole Terminal approach so if there was another way that would be great

Many thanks in advance

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

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

发布评论

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

评论(2

静若繁花 2024-10-16 06:38:04

如果您无法升级,请使用 PEAR 的 Services_JSON。它从 PHP 4.3 开始工作,所以你应该没问题。

If you're unable to upgrade, use PEAR's Services_JSON. It works as of PHP 4.3 so you should be fine.

放肆 2024-10-16 06:38:04

也许您应该在应用程序的根目录中的某个位置调用一个检查器函数,该函数执行 function_exists() 用于您需要的几个函数,如果没有,则停止执行以防止出现不需要的结果。

Maybe you should put somewhere in the root of your application a call to a checker function that does function_exists() for a couple of your needed function and if not stops the execution to prevent unwanted results.

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