note 94539 rejected from function.move-uploaded-file by betz
| From: | betz@php.net | Date: | Wed, 11 Nov 2009 11:01:53 +0000 |
| Subject: | note 94539 rejected from function.move-uploaded-file by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162744@lists.php.net to get a copy of this message | ||
Note Submitter: woipi90
----
hy,
i'm new to php and i tried to make a simple code like this my problem is that the file i want
to upload isn't showing up in the destination directory.... :(
if ($bc->getExtension($_FILES['club_avatar']['name']) == 'jpg')
{
move_uploaded_file($_FILES['club_avatar']['tmp_name'], $avatar);
}
then that's the function
function getExtension($str)
{
$i = strrpos($str,".");
if (!$i)
{
return "";
}
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
and thats the html code
<dl>
<dt><label for="avatar">{L_UPLOAD_AVATAR_FILE}:</label></dt>
<dd><input type="file" name="club_avatar" id="avatar"
maxlength="255" class="inputbox" /></dd>
</dl>
i hope you can help me....
grz woipi