php如何解决无法上传大于8M的文件问题

yipeiwu_com6年前PHP代码库
开发一个文件上传共享网站,曾想使用下面的代码实现文件上传的功能:
复制代码 代码如下:

<form enctype="multipart/form-data" action="add_file.php" method="post">
<fieldset><legend>Fill out the form to upload a file:</legend>
<?php // Create the inputs.
for ($i = 0; $i < $counter; $i++) {
echo '<b>File:</b> <input type="file" name="upload' . $i . '" />

<b>Description:</b> <textarea name="description' . $i . '" cols="40" rows="5"></textarea>


';
}
?>
</fieldset>
<input type="hidden" name="submitted" value="TRUE" />
[align=center]<input type="submit" name="submit" value="Submit" />[/align]
</form>

在实际执行过程中发现上传稍微大一些的文件时,显示File couldn't be moved。
数据库里显示文件名称,不显示大小。
而上传大于8M的文件时,页面根本没有反应。

相关文章

探讨php中header的用法详解

 header() is used to send raw HTTP headers. See the HTTP/1.1 specification for more info...

php自定义分页类完整实例

本文实例讲述了php自定义分页类。分享给大家供大家参考,具体如下: <?php header("Content-type:text/html;Charset=utf-8...

执行、获取远程代码返回:file_get_contents 超时处理的问题详解

天气终于晴了,但问题来了。在实现两个站点间用户数据同步,当使用php函数 file_get_contents抓取执行远程页面时,如果连接超时将会输出一个Fatal Error或相当的慢,...

php文件上传表单摘自drupal的代码

drupal文件上传表单的例子 复制代码 代码如下: function upload_form() { $form = array(); // If this #attribute is...

php通过获取头信息判断图片类型的方法

本文实例讲述了php通过获取头信息判断图片类型的方法。分享给大家供大家参考。具体实现方法如下: $filename = '617.gif' ; function pictype (...