如何在php 5.1.6中添加DateTime类支持 [英] How to add DateTime class support in php 5.1.6

查看:173
本文介绍了如何在php 5.1.6中添加DateTime类支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有php 5.1.6并且下面的东西,但仍然无法启用类支持

I have php 5.1.6 and got below thing but still not able to enable class support


注意:实验日期时间支持
PHP 5.1.x尽管DateTime类
(和相关函数)由PHP 5.2.0启用
默认值,但
可以添加实验支持
在配置/编译之前使用以下
标志进入PHP 5.1.x:
CFLAGS = -DEXPERIMENTAL_DATE_SUPPORT = 1

Note: Experimental DateTime support in PHP 5.1.x Although the DateTime class (and related functions) are enabled by default since PHP 5.2.0, > it is possible to add experimental support into PHP 5.1.x by using the following flag before configure/compile: CFLAGS=-DEXPERIMENTAL_DATE_SUPPORT=1

但是我不明白在哪里添加以上。是否应在php.ini中添加?

But I did not understand where to add above line. Should it be added in php.ini?

请帮助。

推荐答案

p>如果您在共享服务器上,您将无法进行此操作(可以与您的托管服务商联系)。如果没有,您将重新编译PHP,并将上述标志附加到您的 ./ configure 标志行之前(之前 make install 进程)。

If you're on a shared server you will not be able to to so (you could talk to your hosting provider). If not, you will have re compile PHP and append the above flags to your ./configure line of flags (before your make and make install processes).

这篇关于如何在php 5.1.6中添加DateTime类支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆