title: file_put_contents(): Only 0 of 178 bytes written, possibly out of free disk space?
body: <p>Why am I getting this error?</p>
  
  <blockquote>
    <p>file_put_contents(): Only 0 of 178 bytes written, possibly out of free disk space</p>
  </blockquote>
  
  <pre><code> *
   * @param  string  $path
   * @return string
   */
  public function hash($path)
  {
      return md5_file($path);
  }
  
  /**
   * Write the contents of a file.
   *
   * @param  string  $path
   * @param  string  $contents
   * @param  bool  $lock
   * @return int
   */
  public function put($path, $contents, $lock = false)
  {
      return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
  }
  
  /**
   * Prepend to a file.
   *
   * @param  string  $path
   * @param  string  $data
   * @return int
   */
  public function prepend($path, $data)
  {
      if ($this-&gt;exists($path)) {
          return $this-&gt;put($path, $data.$this-&gt;get($path));
      }
  
      return $this-&gt;put($path, $data);
  }
  
  /**
   * Append to a file.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/awGY0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/awGY0.jpg" alt="enter image description here"></a></p>