PHP save source data image to up level domain and show it
<p>I have an sub domain, in there I make a PHP function to save source data image to database.</p>

<pre><code>http://mobile.example.com
</code></pre>

<p>and this is the file source</p>

<pre><code>public_html/mobile/index.php
</code></pre>

<p>Now I want the source data image can be save to </p>

<pre><code>public_html/images/
</code></pre>

<p>and this is the function source data image:</p>

<pre><code>$filename = "/images/". $_FILES['file']['name'];
</code></pre>

<p>I have tried with the $filename function, but the image can't be show.</p>

<p>The error is :</p>

<pre><code>Warning: imagejpeg() [function.imagejpeg]: Unable to open '/images/wallpaper_need_for_speed_prostreet_05_1024.jpg' for writing: No such file or directory in /home/hapshou1/public_html/mobile/profile.php on line 135
</code></pre>
