Failed to open stream using composer autoload
<p>I just included in the probject folder the phpmailer through composer running this command: <code>composer require phpmailer/phpmailer</code> inside the folder: <code>application/assets/</code></p>

<p>I included in the index.php file the following command:</p>

<pre><code>include 'application/assets/vendor/autoload.php';
</code></pre>

<p>but unfortunately I get this error:</p>

<blockquote>
  <p>Warning: include(application/assets/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/projects/MyApp/index.php on line 74</p>
</blockquote>

<p>this is the tree view of my application:</p>

<pre><code>&gt;MyApp
    &gt;application  
       &gt;assets
           &gt;vendor
               &gt;autoload.php
    &gt;system  
    &gt;index.php
</code></pre>

<p>inside the <code>vendor</code> folder I've <code>composer</code> and <code>phpmailer</code> folder, and if I include manually phpmailer class I doesn't get any error, this happen only when I include the composer autoload. </p>

<p>This is the content of <code>autoload.php</code>:</p>

<pre><code>&lt;?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit13c998efcdd189d437d19150f7ef3bc9::getLoader();
</code></pre>