php : unable to upload file to the server
<p>hey I am not much of a PHP coder</p>

<p>I am using following to upload file to server acn any body help me whats wrong with this code</p>

<pre><code>&lt;?php 

$uploaddir = './uploads/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo "http://iphone.zcentric.com/uploads/{$file}";
}

?&gt;
</code></pre>

<p>Thanx in advance</p>
