php上传文件彻底限制在50k以下,快疯了!
[b] 现在我用的开发环境是windows8.1下Nginx+php5.5,集成环境是phpstorm8.02,问题如下:
我在学习php的文件上传的时候发现我上传到的文件最大只能到50k不论是文本文件还是图片,小于50k都可以正常上传,超过50k,$_FILES["fllename"]["error"]就等于3,我上官网查了错误代码的意思是“UPLOAD_ERR_PARTIAL ,文件只有部分被上传”。网上都是解释错误代码什么意思的,但是没有一个说怎么解决的,各种可能的解决方法都已经试过了,php.ini里边的配置肯定没错,超时设置改到600s,upload_max_filesize 已经改到100M,post_max_size改到100M都不管用,我确定已经生效了,但是好像不起作用,nginx-conf也修改过不管用,什么gzip,limit()都尝试过,实在是不知道怎么办了,请万能的大神告诉我到底是哪里可能出问题了吗???完全找不到头绪的感觉太差了。。。
回复讨论(解决方案)
你检查一下实际可用内存和磁盘配额是否足够
你好,你说的实际可用内存是php.ini中的memory_limit值吗,我已经设定为128M了,还是其他的内存设置呢?磁盘配额这个在哪里设置啊?谢谢
你检查一下实际可用内存和磁盘配额是否足够
你好,你说的实际可用内存是php.ini中的memory_limit值吗,我已经设定为128M了,还是其他的内存设置呢?磁盘配额这个在哪里设置啊?谢谢
请问下改了php.ini 文件,有没重启,不重启是不会生效的。
请问下改了php.ini 文件,有没重启,不重启是不会生效的。
这个,我每次都重启的,还有连电脑都重启了都没用,phpinfo()中显示我已经修改成功了,而且我改小了它就起作用,比如说我限制到10k,那我只能传10k一下的,说明我的设置应该是没问题的。然后我再改到100M,但还是最大只有50K,所以我觉得应该是其他哪里限制了这个大小,但我就是找不到到底是哪里限制了。。。。。。
php.ini 设置的都是最多使用的内存值,并不代表你实际能使用那么多
实际能使用的内存数量是由硬件和操作系统决定的
php.ini 设置的都是最多使用的内存值,并不代表你实际能使用那么多
实际能使用的内存数量是由硬件和操作系统决定的
这么说我大概明白了,可是我就传个50k的就被限制住了,这个也太小了吧, 这是当前内存使用,我现在找不到到底是哪里限制这个值了
大神!大侠!救命啊!!!!!!
有木有人啊。。。。。。。。。
Phpstorm有这种bug,不知道在其他平台上有没有,如果你不单独设置,每次打开文件会自动加上:63342端口,使用Phpstorm内置的网络服务器打开,可能就是这个内置服务器对上传文件进行了限制,在Tools->Deployment->Configuration中进行设置,将端口改为nginx的80端口,这个问题就解决了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Long URLs, often cluttered with keywords and tracking parameters, can deter visitors. A URL shortening script offers a solution, creating concise links ideal for social media and other platforms. These scripts are valuable for individual websites a

Following its high-profile acquisition by Facebook in 2012, Instagram adopted two sets of APIs for third-party use. These are the Instagram Graph API and the Instagram Basic Display API.As a developer building an app that requires information from a

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

The 2025 PHP Landscape Survey investigates current PHP development trends. It explores framework usage, deployment methods, and challenges, aiming to provide insights for developers and businesses. The survey anticipates growth in modern PHP versio
