Вроде бы как все очень тривиально, но пол дня мучался, но никак не получается, самое любопытное, что очень редко и далеко не все файлы загрузить получается. Но мне надо не редко, а всегда
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
Deathvalley
Вроде бы как все очень тривиально, но пол дня мучался, но никак не получается, самое любопытное, что очень редко и далеко не все файлы загрузить получается. Но мне надо не редко, а всегда
Основные куски кода:
<form action="upload_image.php" method="post" enctype="multipart/form-data">
<input name="MAX_FILE_SIZE" type="hidden" value="5000">
Select image: <input name="userimage" type="file" multiple size="50" accept="image/gif,image/png,image/jpg">
<input type="submit" value="Send Image">
</form>
upload_image.php:
$upload_image_dir = '/uploads/images/";
$newname = $upload_image_dir.$_FILES["userimage"]["name"];
if (is_uploaded_file($_FILES["userimage"]["tmp_name"]))
{
move_uploaded_file($_FILES["userimage"]["tmp_name"],$newname);
print "<font color='green'><p>Изображение успешно загружено.</p></font><BR>";
}
else
{ print "<font color='red'><p>Ошибка при загрузке.</p></font><BR>";
}
Пробывал в очень разных вариантах подобный код, результат один
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.