title: Error while writing file in CodeIgniter
body: <p>I am writing php codeigniter from scratch 
  and i am trying know write_file function in file helper
  this is my controller</p>
  
  <pre><code> &lt;?php
  
   class Files extends CI_Controller {
  
      var $file;
      function Files()
      {
          $this-&gt;file = "application" . DIRECTORY_SEPARATOR . "files" . DIRECTORY_SEPARATOR . "hello.txt";
      }
  
      function write_file(){
  
          $data = "Hello World !! :)";
  
          write_file($this-&gt;file,$data ,'a');
          echo "writing is finishing...";
      }
   }
  </code></pre>
  
  <p>and my version is 2.1.4, befog I put 'a' it works great but after I add it 
  it gives me this error </p>
  
  <pre><code>Call to undefined function write_file() in C:\wamp\www\test7\application\controllers\files.php
  </code></pre>