有人能解释一下这段代码吗,我正在遵循一本非常好的书,这是推荐给我的,我已经输入了代码,就像它在书中一样。它显示的代码,而不是出来,我不知道是什么错了,代码是从一本书叫做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>
这肯定是因为您正在编写PHP代码在。html或。htm扩展文件尝试把代码与。PHP扩展文件。