fopen() can't write with error "HTTP wrapper does not support writeable connections"
<p>I have a file with url: <code>http://localhost:8080/cache/a66b311547bf3da88f01139271d5bb50.txt</code>
And in php I using code:</p>

<pre><code>$file = "http://localhost:8080/cache/a66b311547bf3da88f01139271d5bb50.txt"
$output = serialize($data);
$fp = fopen($file, "w");
fputs($fp, $output);
fclose($fp);
</code></pre>

<p>When run code, is error</p>

<blockquote>
  <p>Warning: fopen(http://localhost:8080/cache/a66b311547bf3da88f01139271d5bb50.txt): failed to open stream: HTTP wrapper does not support writeable connections ...</p>
</blockquote>

<p>How to fix it?</p>
