我是一个PHP开发人员,我做了一个从Ios End.But上传文件的网络服务,问题是当我从服务器端上传一个15MB的文件时,文件被成功上传了,我还在php.ini中做了以下设置。
; Maximum allowed size for uploaded files.
upload_max_filesize = 50M
; Must be greater than or equal to upload_max_filesize
post_max_size = 50M
//PHP script to upload a file
<?php
$filename = $_FILES["
我正在做一个文件上传在php中的验证。我想验证一个文件
if > 3MB: display error。
else: proceed to upload
我现在要做的是,如果文件大小大于或小于3MB,它将显示错误。以下是守则:
/*
* other validation of post here
*
*/
if (isset($_FILES['uploaded'])) {
$filesize = $_FILES['uploaded']['size'];
if ($filesize > 3145728) {
我有2个php文件:名为form_upload.php
<html>
<head><title>File Upload</title></head>
<body>
<ol>
<li>Enter the file name of the product picture you want to upload or the the browse button to navigate to the picture file</li>
&l