Am trying to read a .docx file which is inside my project folder via PHP Word library. I have included autoloader like this :
`include_once 'vendor/autoload.php';` in my controller.

**CODE FOR FUNCTION IN CONTROLLER:**

```
function test_phpword()
{
 $a=base_url();
 $path=$a."".'123.docx';
 $source =$path;

 echo date('H:i:s'), " Reading contents from `{$source}`";
 $phpWord = \PhpOffice\PhpWord\IOFactory::load($source);

 echo write($phpWord, basename(__FILE__, '.php'), $writers);
}

```

**BUT GETTING ERROR LIKE BELOW:**

> 
> 06:18:42 Reading contents from `http://localhost/myproject/123.docx`
> 
> 
> Fatal error: Uncaught Exception: Cannot find archive file. in /opt/lampp/htdocs/myproject/vendor/phpoffice/common/src/Common/XMLReader.php:51
> 
> 
>