title: How to read .txt or .doc file in codeigniter?
body: <p>I am trying to follow this tutorial <a href="https://www.codeigniter.com/user_guide/helpers/file_helper.html" rel="nofollow noreferrer">https://www.codeigniter.com/user_guide/helpers/file_helper.html</a>  and then I make this controller to display the file txt content which I call test.txt </p>
  
  <p>
  
  <pre><code>class File_controller extends CI_Controller {
  function __construct(){ 
  parent::__construct();
          $this-&gt;load-&gt;helper('url'); 
              $this-&gt;load-&gt;helper('file');    
      }
  public function index()
  {
      $string = read_file(base_url().'test.txt');
      echo $string;
    }
  
   }
  </code></pre>
  
  <p>when I am testing this in browser no error is found, but the program is not displaying my file txt content,so</p>
  
  <p>1.how to display test.txt correctly?</p>
  
  <p>2.what the meaning is this parameter:</p>
  
  <pre><code>'./path/to/file.php'
  </code></pre>
  
  <p>when I am using</p>
  
  <pre><code>read_file('./path/to/file.php');
  </code></pre>