copy() & getcwd() works locally, not online
<p>This line of code works for me locally:</p>

<pre><code>$copythumb = copy($externalsource, getcwd().'\\img\\covers\\'.$id.'thumb.jpg');
if (!$copythumb) {echo 'Couldn\'t add thumbnail';}  
</code></pre>

<p>But when I upload it to my server I just get "Couldn't add thumbnail" and it's not copied.
I've tried to change <code>\\img\\covers\\</code> to <code>/img/covers/</code> with no luck.
Ive' also messed around with <code>dirname(realpath(__FILE__))</code> and <code>$_SERVER['DOCUMENT_ROOT']</code></p>

<p>Local:</p>

<pre><code>echo getcwd(); //returns D:\Server\www\project
</code></pre>

<p>Server:</p>

<pre><code>echo getcwd(); //returns /storage/content/xx/xxxxxx/xxx.com/public_html/project
</code></pre>

<p>Would be really thankful if someone could provide any help!</p>
