You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`brunodebarros/fix-php-post-input` fixes your `$_POST` and `$_FILES` if they're empty and they shouldn't be.
4
+
5
+
**Why?** Some incorrectly setup servers will not pass the right information required for PHP to automatically process input data (e.g. they'll say the HTTP method was GET because of an internal redirect).
6
+
7
+
For apps where you control the environment, this is easy to resolve. For self-hosted apps, that anyone can install anywhere, it's important to make sure that things continue to work without having to ask less tech-savvy users to mess with their server configurations.
8
+
9
+
In those cases, this library will automatically fix the `$_POST` and `$_FILES` arrays for you so that you can continue working without having to worry about it.
10
+
11
+
As a bonus, it will also process JSON (`application/json`) input into `$_POST` for you.
12
+
13
+
## Requirements
14
+
15
+
* PHP 5.4 or HHVM
16
+
17
+
## Installation
18
+
19
+
`brunodebarros/fix-php-post-input` loads automatically with Composer.
20
+
21
+
```
22
+
composer require brunodebarros/fix-php-post-input
23
+
```
24
+
25
+
## Usage
26
+
27
+
Once required, the package will automatically fix your `$_POST`/`$_FILES` for you. If they don't need fixing, this package will do nothing.
28
+
29
+
## Suggestions, questions and complaints.
30
+
31
+
If you've got any suggestions, questions, or anything you don't like about this library, [you should create an issue here](https://github.com/BrunoDeBarros/fix-php-post-input/issues/new). Feel free to fork this project, if you want to contribute to it.
0 commit comments