首页
导航
博客
电子书
算法
众创
代码
随贴
关于我们
您好,欢迎来到码863代码分享网! 请
[登录]
/
[注册]
搜 索
标题:
*
140
字
TAG标签:
(用空格隔开)
30
字
恢复历史版本:
请选择分类
html
python
javascript
php
sql
c
c++
c#
java
plain
所有人可见
仅自己可见
编辑器:UEditor
编辑器:TinyMCE
编辑器:Editor.md
HTML转MD
HTML转MD2
<p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">phpmyadmin导入SQL文件时涉及到phpmyadmin上传文件大小限制问题,默认phpmyadmin上传文件大小为2M,如果想要phpmyadmin上传超过2M大文件,就需要修改phpmyadmin上传文件的大小配置或者将大文件分几批上传,相对来说修改phpmyadmin上传文件大小的限制来得方便很多。解决phpmyadmin上传文件大小限制问题涉及修改php.ini配置文件和phpmyadmin配置文件。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">修改phpmyadmin上传文件大小限制主要分修改php.ini配置文件和phpmyadmin配置文件两个步骤。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">第一步:修改php.ini配置文件中文件上传大小配置</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">此步骤与一般的PHP.INI配置文件上传功能方法一致,需要修改php.ini配置文件中upload_max_filesize和post_max_size两个选项值,具体修改方法请参考:PHP.INI配置:文件上传功能配置教程。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">第二步:修改php执行时间及内存限制实现phpmyadmin上传大文件功能</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">如果想要phpmyadmin上传大文件,还需修改php.ini配置文件中的max_execution_time(php页面执行最大时间)、max_input_time(php页面接受数据最大时间)、memory_limit(php页面占用的最大内存)三个配置选项,这是因为phpmyadmin上传大文件时,php页面的执行时间、内存占用也势必变得更长更大,其需要php运行环境的配合,光修改上传文件大小限制是不够的。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">第三步:修改phpmyadmin配置文件</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">在完成php.ini的相关配置后,还需要修改phpmyadmin配置。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">1、修改phpmyadmin config配置文件中的$cfg[‘ExecTimeLimit’]配置选项,默认值是300,需要修改为0,即没有时间限制。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">2、修改phpmyadmin安装根目录下的import页面中的$memory_limit</p><p style="text-align:center;margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);"><img src="/ueditor/php/upload/image/20150414/1428972359977494.jpg" alt="" width="468" height="185" border="0" style="border: 0px;"/></p><p style="text-align:center;margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);"> </p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);"> </p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">说明:首选读取php.ini配置文件中的内存配置选项memory_limit,如果为空则默认内存大小限制为2M,如果没有限制则内存大小限制为10M,你可以结合你php.ini配置文件中的相关信息修改这段代码。</p><p style="margin-top: 0px; margin-bottom: 15px; line-height: 27px; font-size: 14px; text-indent: 2em; white-space: normal; font-family: 'Segoe UI', Tahoma, Arial; padding: 0px; border: 0px currentcolor; vertical-align: baseline; font-stretch: inherit; background-color: rgb(245, 250, 255);">至此,经过修改php.ini配置文件中的文件上传配置选项以及phpmyadmin配置文件后,即可解决phpmyadmin上传文件大小限制问题,从而实现phpmyadmin上传大文件功能。</p><p><br/></p>
CopyRight 2002~2023 精通2100网 联系邮箱:qqtxt@163.com
版权所有:精通2100网
湘ICP备2023018646号-1
MYSQl共执行 4 个查询,用时 0.002751350402832 秒,PHP脚本用时 0.005120 秒,占用内存 0.527 MB,Gzip 已启用