title: file_get_contents does not work in codeigniter
body: <p>I have a function in my controller to fetch some data from a callback url. And the data will get updated in database automatically.   </p>
  
  <p>My callback url is <strong><a href="http://example.com/API/sendSMSCallback" rel="nofollow noreferrer">http://example.com/API/sendSMSCallback</a></strong>  </p>
  
  <p>and this is my <strong>sendSMSCallback</strong> function in <strong>API</strong> controller</p>
  
  <pre><code>public function sendSMSCallback() {
      $json = file_get_contents('php://input'); 
      $data = array('value' =&gt; $json, 'date' =&gt; date('Y-m-d h:i:s'));
      $this-&gt;db-&gt;insert('test', $data);    // for testing
  
      $json = urldecode($json);        
      $obj = json_decode($json,TRUE);
      $reqID = $obj['req_id'];
      $status = $obj['status'];
      $mobile = $obj['msisdn'];
  
      $this-&gt;db-&gt;where('UniqueID', $reqID);
      $this-&gt;db-&gt;where('MobileNo', $mobile);
      $this-&gt;db-&gt;set('ResponseStatus', $status);
      $this-&gt;db-&gt;update('smslog_tbl');
  
      // for testing
      $this-&gt;load-&gt;helper('file');
  
      if ( ! write_file(base_url().'test.txt', $json)){
          echo 'Unable to write the file';
      }
      else{
          echo 'File written!';
      }
  }
  </code></pre>
  
  <p>expected data in the form of json as follows</p>
  
  <pre><code>{"result":{"status":"success","req_id":"0d0dd0ce8-dadf-49fd-a49e-9845787e0507","msisdn":"91xxxxxxx, "}}
  </code></pre>
  
  <p>but nothing will get updated in <strong>smslog_tbl</strong> table and <strong>test.txt</strong> is empty. New row is inserted in <strong>test</strong> table, but <strong>value</strong> field is empty. Please help me to find out a solution. Thanks in advance</p>
  
  <p><strong>UPDATE :</strong> 
  table structure : test </p>
  
  <pre><code>`id` int(11) NOT NULL,
  `value` text COLLATE latin1_general_ci NOT NULL,
  `date` datetime NOT NULL
  </code></pre>