php 5.3致命错误Class DateTimeZone未找到 [英] php 5.3 Fatal error Class DateTimeZone not found

查看:181
本文介绍了php 5.3致命错误Class DateTimeZone未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过了,运行下面的代码,在PHP v5.3.13,但仍然得到找不到类错误:

I tried, to run the following code, on PHP v5.3.13, but still getting the class not found error:

$tZone = new DateTimeZone("Europe/Amsterdam");

如何在5.3.13上使用DateTimeZone?

How can I use DateTimeZone on 5.3.13?

推荐答案

尝试这样:

$tZone = new \DateTimeZone("Europe/Amsterdam");

这篇关于php 5.3致命错误Class DateTimeZone未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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