PHP Uploads Limit for Scanning?

2019-08-27 09:21发布

I read somewhere that the upload limit for php is about 2MBs. Does this still apply if I am asking a user to upload a file to the server to scan through and convert to a string? If so how do I get around this?

The application for this is a scanner type deal where users would be able to upload a code file, and this php application would scan through the code and look for certain comments to document and write to a documentation file.

2条回答
家丑人穷心不美
2楼-- · 2019-08-27 10:06

The upload limits are configured in the php.ini file, see this: http://www.radinks.com/upload/config.php

Yes it would apply to any file that is being uploaded by the user, regardless of what your server side app does with it. :)

The upload limit can be changed by modifying the settings in php.ini file.

查看更多
别忘想泡老子
3楼-- · 2019-08-27 10:11

Yes it would (assuming it's a POST). You get around it by changing your php config.

PHP has two limits that apply in this case. Both are ini options: upload_max_filesize and post_max_size

I believe the upload_max_filesize defaults to 2 MB. (The post_max_size setting has to be larger than upload_max_filesize).

See: Core php.ini directives

查看更多
登录 后发表回答