# php.ini を変更
# コメントアウトと値の設定
# extension=openssl
# extension_dir = "ext"
# インストール用フォルダを作って移動
mkdir install
cd install
# https://getcomposer.org/download/
# Command-line installation の通りに実行して composer.phar をダウンロード
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
# composer.phar を 移動
mv composer.phar ../
cd ../
# 実行用バッチファイル作成
echo php "%~dp0composer.phar" %* > composer.bat
# 実行テスト
composer.bat --version
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme