亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

解析錯誤:解析錯誤,期待 `'{'' Laravel

解析錯誤:解析錯誤,期待 `'{'' Laravel

PHP
拉丁的傳說 2022-10-14 10:50:39
我php artisan route:list在一個 laravel 項目的 eclipse 文件夾中運行并得到了這個錯誤。我檢查了文件,那里{有。$  php artisan route:list警告:第 8 行 /Users/frankukachukwu/eclipse-workspace/essenceglobalmart.net/app/vendor/zendframework/zend-dictoros/src/functions/create_uploaded_file.php 中不支持聲明“strict_types”解析錯誤:解析錯誤,在第 19 行的 /Users/frankukachukwu/eclipse-workspace/essenceglobalmart.net/app/vendor/zendframework/zend-dictoros/src/functions/create_uploaded_file.php 中期待 `'{''<?php/** * @see       https://github.com/zendframework/zend-diactoros for the canonical source repository * @copyright Copyright (c) 2018 Zend Technologies USA Inc. (https://www.zend.com) * @license   https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License */declare(strict_types=1);namespace Zend\Diactoros;/** * Create an uploaded file instance from an array of values. * * @param array $spec A single $_FILES entry. * @throws Exception\InvalidArgumentException if one or more of the tmp_name, *     size, or error keys are missing from $spec. */function createUploadedFile(array $spec) : UploadedFile {    if (! isset($spec['tmp_name'])        || ! isset($spec['size'])        || ! isset($spec['error'])    ) {        throw new Exception\InvalidArgumentException(sprintf(            '$spec provided to %s MUST contain each of the keys "tmp_name",'            . ' "size", and "error"; one or more were missing',            __FUNCTION__        ));    }    return new UploadedFile(        $spec['tmp_name'],        $spec['size'],        $spec['error'],        isset($spec['name']) ? $spec['name'] : null,        isset($spec['type']) ? $spec['type'] : null    );}
查看完整描述

1 回答

?
白衣非少年

TA貢獻1155條經驗 獲得超0個贊

您使用的軟件包似乎與您的PHP版本不兼容

您需要一個兼容的PHP版本,即7.0.0 - 7.0.5 || ^7.0.7.

要解決此問題,您可以更新PHP版本或降級包


查看完整回答
反對 回復 2022-10-14
  • 1 回答
  • 0 關注
  • 93 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號