CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link type="text/css" rel="StyleSheet" href="/images/css/file_001.css" />
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
- <title>Загрузка аватара</title>
- </head>
- <body>
- <table cellpadding="5" cellspacing="0" width="95%" align="center" class="mytable" bgcolor="#191919"><tr><td>
- <form action='/users/registration/upload' method='POST' enctype="multipart/form-data">
- <input id='avatarup' class='formstyle' type='file' name='avatarup' size="50" /> <input class='formstyle' type='submit' name="submit" value='Загрузить' />
- </form>
- <?php
- if(is_uploaded_file($_FILES["avatarup"]["tmp_name"]))
- {
- move_uploaded_file($_FILES["avatarup"]["tmp_name"], "Z:/home/mysite.ru/www/files/avatar/".'a_'.rand(000000000,999999999).'.png');
- }
- ?>
- </td></tr></table>
- </body>
- </html>