我將在我的 php 項(xiàng)目中為電子PHP表格安裝一個(gè)Composer,但出現(xiàn)php version錯(cuò)誤。我嘗試安裝了很多次,但仍然是同樣的錯(cuò)誤。這個(gè) composer.json{ "name": "phpoffice/phpspreadsheet", "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", "keywords": ["PHP", "OpenXML", "Excel", "xlsx", "xls", "ods", "gnumeric", "spreadsheet"], "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", "type": "library", "license": "LGPL-2.1-or-later", "authors": [ { "name": "Maarten Balliauw", "homepage": "https://blog.maartenballiauw.be" }, { "name": "Mark Baker", "homepage": "https://markbakeruk.net" }, { "name": "Franck Lefevre", "homepage": "https://rootslabs.net" }, { "name": "Erik Tilt" }, { "name": "Adrien Crivelli" } ], "scripts": { "check": [ "php-cs-fixer fix --ansi --dry-run --diff", "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n", "phpunit --color=always" ], "fix": [ "php-cs-fixer fix --ansi" ], },這些是錯(cuò)誤顯示- Installation request for mpdf/mpdf v7.1.6 -> satisfiable by mpdf/mpdf[v7.1.6]. - mpdf/mpdf v7.1.6 requires php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 -> your PHP version (7.3.6) does not satisfy that requirement.- Installation request for mpdf/mpdf v7.1.6 -> satisfiable by mpdf/mpdf[v7.1.6].- mpdf/mpdf v7.1.6 requires php ^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 -> your PHP version (7.3.6) does not satisfy that requirement.請(qǐng)幫忙。
1 回答

30秒到達(dá)戰(zhàn)場(chǎng)
TA貢獻(xiàn)1828條經(jīng)驗(yàn) 獲得超6個(gè)贊
使用以下命令安裝依賴項(xiàng):
composer install --ignore-platform-reqs
或使用以下內(nèi)容更新 composer.json
"config": {
"preferred-install": "dist",
"platform": {
"php": "7.2.0"
}
}
上述任何一種解決方案都會(huì)對(duì)您有所幫助。
- 1 回答
- 0 關(guān)注
- 252 瀏覽
添加回答
舉報(bào)
0/150
提交
取消