【发布时间】:2017-09-30 03:07:34
【问题描述】:
我正在尝试使用 echo $_FILES['photo']['size'] 检查文件的大小,但没有返回任何内容。
HTML
<form method="POST" action="sendToDatabase.php">
<fieldset>
<legend>Artwork</legend>
<label>Album Artwork</label>
<input type="file" name="art" />
<p>
File must be saved as a .jpg file.<br />Please crop to 150px wide X 200px tall before uploading.
</p>
</fieldset>
<input type="submit" name="submit" value="Submit Album" class="submitBtn" />
</form>
PHP
<?php echo $_FILES['art']['size']; ?>
【问题讨论】: