Asked  7 Months ago    Answers:  5   Viewed   46 times

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");

How can I use DateTimeZone on 5.3.13?

 Answers

72

Try this:

$tZone = new DateTimeZone("Europe/Amsterdam");
Saturday, May 29, 2021
 
mnagel
answered 7 Months ago
94

You need to fully qualify the relative class name Yii.

The most convenient way to do this is by importing the class: just add use Yii; below your namespace declaration.

Saturday, May 29, 2021
 
Jimenemex
answered 7 Months ago
11

Looks like a known issue in PhpStorm.

Saturday, May 29, 2021
 
Besnik
answered 7 Months ago
45

Replace this include './connection.php'; to include 'connection.php';
Replace you class name connection to Connection

Saturday, May 29, 2021
 
CAMason
answered 7 Months ago
16

There are two extensions for memcached in PHP, "memcache" and "memcached".

It looks like you're trying to use one ("memcache"), but the other is installed ("memcached").

Thursday, June 3, 2021
 
ioleo
answered 6 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share