我在我的 VPS 中增加了我的 php.ini 文件的值,然后我重新启动了我的服务器 + 重新启动的服务。仍然没有上传超过 5 MB。我正在使用以下代码进行上传。我正在上传具有正确图像扩展验证的图像。
$target_path = "uploads/";
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
}
else{
echo "There was an error uploading the file, please try again!";
}