我使用PHP v8.1 並嘗試使用以下命令打開Codeigniter (v4.2.10) 歡迎頁面:php Sparkserve
並收到此錯誤:無法開啟輸入檔:spark
。 < /p>
我上網搜尋過,沒有找到任何相關內容。所以我嘗試使用composer安裝spark: composer require sparkphp/spark
但沒有運氣。我收到以下錯誤:
Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires sparkphp/spark ^0.16.3 -> satisfiable by sparkphp/spark[0.16.3]. - sparkphp/spark 0.16.3 requires destrukt/destrukt ^0.7.1 -> could not be found in any version, there may be a typo in the package name. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details. - It's a private package and you forgot to add a custom repository to find it Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems. You can also try re-running composer require with an explicit version constraint, e.g. "composer require sparkphp/spark:*" to figure out if any version is installable, or "composer require sparkphp/spark:^2.1" if you know which you need. Installation failed, deleting ./composer.json.
現在我不知道該怎麼辦,非常感謝您的幫助。
表示您不在 Codeigniter 根目錄中。 只需進入 Codeigniter 根目錄然後運行命令即可。 如果您使用 Composer 來建立應用程式
只需轉到「專案根目錄」(您寫的任何名稱)