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