【目的】
composerを利用して、
https://github.com/sendgrid/sendgrid-php
を利用しようとしたのですが、
php
1Warning: require(/var/www/test/vendor/composer/../../lib/SendGrid.php): 2 failed to open stream: No such file or directory in 3 /var/www/test/vendor/composer/autoload_real.php on line 66
上記のエラーが出てしまったので、自分の導入方法に誤りがあるのではないかと思い、
ご相談させていただきました。
1.利用したいディレクトリにコマンドの実行
/var/www/test/
というディレクトリに対して、以下のコマンドを入力しました。
curl -sS https://getcomposer.org/installer | php
すると、ディレクトリ内に
composer.pharが出来上がりました。
2.同じディレクトリ内にcomposer.jsonを入れる
利用したいファイル(sendgrid-php-master)に入っている
composer.jsonを同じディレクトリ(var/www/test/)に移し
以下のコマンドを実行しました。
php composer.phar install
3.実行してみる
この状態で、/var/www/test/index.phpのなかで、
php
1require_once('vendor/autoload.php');
を実行したら、冒頭のエラーが出てしまいました…
原因が分からないため、助けてください。
【追記】
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
再度、composer installを実行したら
上記メッセージが出ました
回答1件
あなたの回答
tips
プレビュー