note 94539 added to function.move-uploaded-file
| From: | woipi90 at osu1 dot php dot net | Date: | Wed, 11 Nov 2009 08:48:08 +0000 |
| Subject: | note 94539 added to function.move-uploaded-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162740@lists.php.net to get a copy of this message | ||
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
----
Server IP: 69.147.83.197
Probable Submitter: 83.65.205.218
----
Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php
Edit -- https://master.php.net/note/edit/94539
Del: integrated -- https://master.php.net/note/delete/94539/integrated
Del: useless -- https://master.php.net/note/delete/94539/useless
Del: bad code -- https://master.php.net/note/delete/94539/bad+code
Del: spam -- https://master.php.net/note/delete/94539/spam
Del: non-english -- https://master.php.net/note/delete/94539/non-english
Del: in docs -- https://master.php.net/note/delete/94539/in+docs
Del: other reasons-- https://master.php.net/note/delete/94539
Reject -- https://master.php.net/note/reject/94539
Search -- https://master.php.net/manage/user-notes.php