Fatal error: strict_types declaration must be the very first statement in the script in D:\localuser\ftp6276704\Web\index.php on line 8 PHP Fatal error: strict_types declaration must be the very first
statement in the script in D:\localuser\ftp6276704\Web\index.php on line
8
你先按照這個方法在index.php文件中打開開發者模式:http://www.zbshanke.com/doc/204.html
然后把故障詳情發來[看看?? ]
Fatal error: strict_types declaration must be the very first statement in the script in D:\localuser\ftp6276704\Web\index.php on line 8
PHP Fatal error: strict_types declaration must be the very first statement in the script in D:\localuser\ftp6276704\Web\index.php on line 8
這個錯誤是php版本低了,你運行下test.php看看結果
具體要看是什么錯誤
回復@迅睿框架技術-劉和平
客戶端信息:Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
PHP版本要求:7.2及以上,當前7.2.5
MySQL版本要求:5.6及以上
如果以上提示文字是紅色選項,就必須修改正確的環境配置 (*^▽^*) ,當網站正式上線后,請刪除本文件吧~
php版本需要73以上
回復@迅睿框架技術-劉和平 這個空間的最高就是這個.
那只有下下策了,把D:\localuser\ftp6276704\Web\index.php 這個文件第八號代碼刪掉了
新版需要php73環境了,72都無法安裝
declare(strict_types=1);
header('Content-Type: text/html; charset=utf-8');
//header('X-Frame-Options: SAMEORIGIN'); // 防止被站外加入iframe中瀏覽
// 是否是開發者模式(1開啟、0關閉)
define('IS_DEV', 1);
// 是否允許后臺修改模板文件(1開啟、0關閉),請不要長期開啟此功能
define('IS_EDIT_TPL', 0);
// 主網站目錄,表示index.php文件的目錄
define('ROOTPATH', dirname(__FILE__).'/');
// 當前站點目錄
!defined('WEBPATH') && define('WEBPATH', dirname(__FILE__).'/');
// 緩存文件存儲目錄,支持自定義路徑,建議固態硬盤存儲緩存文件
define('WRITEPATH', ROOTPATH.'cache/');
// 系統核心程序目錄,支持自定義路徑和改名
define('FCPATH', dirname(__FILE__).'/dayrui/');
這句不要了
是不是用了不正規的編輯器改了php文件啊,我以前用記事本改了php文件就報這個錯誤,要用正規的編輯器
回復@影子 8uftp改的
去掉還是不行嗎?
8uftp就是不規范的編輯器,這玩意一改文件就報錯,應該使用notepad++編輯器
需要看日志內容
回復@迅睿框架技術-劉和平 Unable to set client connection character set: utf8mb4
主機環境的mysql 不支持utf8mb4格式,無法安裝了,或者找服務商升級主機
回復@迅睿框架技術-劉和平 無法安裝..