我一直在尝试通过phpMyAdmin导入数据库.我的数据库文件是a.sql,它的大小是1.2 GB我试图在本地导入它,phpMyAdmin说:
您可能尝试上传过大的文件.有关解决此限制的方法,请参阅文档.
请帮助我真的需要这个工作.
我想使用PHP和Apache服务器上传大约150 MB的文件.使用我的代码,我可以上传高达5MB
<?php
$path = $_COOKIE['Mypath'];
$target_path = "uploads/".$path ;
if(!isDir($target_path))
{
mkdir($target_path);
}
# Do uploading here
$target_path = "uploads/".$path ."/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path))
{
header("Location: somepage.html");
}
else
{
echo "File not uploaded";
}
?>
Run Code Online (Sandbox Code Playgroud)
php.ini中
max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 300 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit …Run Code Online (Sandbox Code Playgroud)