PHP致命错误:找不到接口"JsonSerializable"-我的PHP版本为7.0.17 [英] PHP Fatal error: Interface 'JsonSerializable' not found - My Php Version is 7.0.17
本文介绍了PHP致命错误:找不到接口"JsonSerializable"-我的PHP版本为7.0.17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发了一个Laravel项目.在本地系统中工作正常.当我将项目移到服务器时.它的返回跟随错误.
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
我的PHP版本是7.0.17.如何解决此问题.
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;
.....................
......................
}
推荐答案
检查您的Php信息设置,Json已启用.
Check your Php info Settings, Json is Enabled.
这篇关于PHP致命错误:找不到接口"JsonSerializable"-我的PHP版本为7.0.17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文