技术知识库

帮助中心 >  产品文档 >  网站相关 >  迅睿CMS页面报错:Fatal error strict_types declaration must be the very first statement in the script in

迅睿CMS版本:4.5.6

迅睿CMS页面报错:系统故障

您的系统遇到了故障,请联系管理员处理

首先index.php文件中打开开发者模式

开启方法:网站根目录文件./index.php

<?php

declare(strict_types=1);

header('Content-Type: text/html; charset=utf-8');

// 是否是开发者模式(1开启、0关闭)

define('IS_DEV', 1);

开启后刷新页面报错:

Fatal error strict_types declaration must be the very first statement in the script in C:\phpstudy_pro\WWW\1\index.php on line 8

然后检查PHP版本是否过低,查看要求版本php7.3及以上,调整高版本后仍不行,尝试注释或删除报错的第八行代码。

declare(strict_types=1);

注释后测试可正常打开。


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: