Installing Composer in WAMP PHP Google+ Project, PHP is not recognised

后端 未结 6 2018
予麋鹿
予麋鹿 2021-01-06 18:39

I am following this PHP Google+ tutorial and I am trying to install composer in my WAMP directory

C:\\wamp\\www\\gplus-quickstart-php>curl -s https://getc         


        
6条回答
  •  日久生厌
    2021-01-06 18:49

    First, to get php into your path see my answer here

    Installing composer is explained nicely here (code below just for illustration. Be sure to get latest from the link)

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    

    A quick check to confirm it worked:

        $ php composer.phar --version
        Composer version 1.2.1 2016-09-12 11:27:19
    

提交回复
热议问题