Может кто-то объяснить этот код, я следую очень хорошей книге, которая мне была рекомендована, и я набрал код точно так же, как в книге. он показывает код вместо отказа, я не уверен, что это неправильно, код из книги под названием решений PHPКод PHP отображается вместо вывода
<?php
// set the max upload size in bytes
$max = 51200;
if(isset($_POST['upload'])){
// define the path to the upload folder
$destination = 'C:\upload_test';
// move the file to the uplaod folder and rename it
move_uploaded_file($_FILES['image']
['tmp_name'], $destination.$_FILES['image']['setara']);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mult</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<form action="" method="post" enctype="mutipar/form-data" id="uploadImage">
<p>
<label for="image">Upload image:</label>
<input type="hidden"name="MAX_FILE_SIZE" value="<?php echo $max; ?>">
<input type="file" name="image" id="image">
</p>
<p>
<input type="submit" name="upload" id="upload" value="Upload">
</p>
</form>
</body>
</html>
Расширение файла '.html' или' .htm'? –
@ ClarksonJey isnt оба одинаковы? –
как вы работаете с файлом и что такое расширение файла? –