title: file_put_contents in php
body: <p>I just tried to use this <code>file_put_contents</code>. 
  The code is: </p>
  
  <pre><code>$file = 'list.txt';
  $subject = "Mail Subject\n";
  file_put_contents($file, $subject);
  </code></pre>
  
  <p>But it doesn’t put any contents. <code>file_get_contents</code> is working though.</p>
  
  <p><strong>Update: Problem solved. I’m not sure. I just changed chmod to 777. But I have a doubt. I am checking the log error.</strong> </p>