title: PHP Fatal error: require(): Failed opening required
body: <p>I have installed Instagram-PHP library <a href="https://github.com/mgp25/Instagram-API" rel="nofollow noreferrer">https://github.com/mgp25/Instagram-API</a>
  via</p>
  <pre><code>composer require mgp25/instagram-php
  </code></pre>
  <p>this created a '/vendor' folder in my project (projects folder is &quot;TinderAI&quot;).</p>
  <p>I've created an 'TinderAI/index.php; file containing:</p>
  <pre><code>&lt;?php
  
  require __DIR__.'/../vendor/autoload.php';
  
  $ig = new \InstagramAPI\Instagram();
  </code></pre>
  <p>(this 'require' address is in the README file of the library).
  Whenever i ran</p>
  <pre><code>php index.php
  </code></pre>
  <p>I got error in my /Applications/MAMP/logs/php_error.log file:</p>
  <blockquote>
  <p>[03-Oct-2018 11:50:24 Europe/Berlin] PHP Warning:
  require(/Users/sergeyfomin/code/tinderAI/../vendor/autoload.php):
  failed to open stream: No such file or directory in
  /Users/sergeyfomin/code/tinderAI/index.php on line 3</p>
  <p>[03-Oct-2018
  11:50:24 Europe/Berlin] PHP Fatal error:  require(): Failed opening
  required '/Users/sergeyfomin/code/tinderAI/../vendor/autoload.php'
  (include_path='.:/Applications/MAMP/bin/php/php7.1.12/lib/php') in
  /Users/sergeyfomin/code/tinderAI/index.php on line 3</p>
  </blockquote>
  <p>there is /examples folder in the library to test it. If I ran any example file, for example &quot;php accessingValues.php&quot; I get similar error (now with the name of the executed file):</p>
  <blockquote>
  <p>[02-Oct-2018 16:08:13 UTC] PHP Warning:
  require(/Users/sergeyfomin/code/tinderAI/vendor/mgp25/instagram-php/examples/../vendor/autoload.php):
  failed to open stream: No such file or directory in
  /Users/sergeyfomin/code/tinderAI/vendor/mgp25/instagram-php/examples/accessingValues.php
  on line 6</p>
  <p>[02-Oct-2018 16:08:13 UTC] PHP Fatal error:  require():
  Failed opening required
  '/Users/sergeyfomin/code/tinderAI/vendor/mgp25/instagram-php/examples/../vendor/autoload.php'
  (include_path='.:/Applications/MAMP/bin/php/php7.1.12/lib/php') in
  /Users/sergeyfomin/code/tinderAI/vendor/mgp25/instagram-php/examples/accessingValues.php
  on line 6</p>
  </blockquote>
  <p>I think this is a very basic level mistake with paths to the files in php, but I can't figure it out. Would be glad if you can help me.</p>