PHP Fatal error: Interface 'JsonSerializable&#

2020-05-01 09:40发布

I Developed One Laravel Project. In local System Its working Fine. When i move the Project to the Server. Its Return Following Error.

PHP Fatal error:  Interface 'JsonSerializable' not found in /home/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 18

My PHP Version is 7.0.17. How to Fix this Issue.

Collection.php

use Countable;
use Exception;
use ArrayAccess;
use Traversable;
use ArrayIterator;
use CachingIterator;
use JsonSerializable;
use IteratorAggregate;
use InvalidArgumentException;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;

class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable
{
    use Macroable;
    .....................
    ......................
}

2条回答
小情绪 Triste *
2楼-- · 2020-05-01 09:57

It would appear that the setup between local and server is different.

Ensure that the resources you are referencing are available to the server in the same location as the local.

查看更多
三岁会撩人
3楼-- · 2020-05-01 09:58

Check your Php info Settings, Json is Enabled.

查看更多
登录 后发表回答