PHP code example of pe / component-form-data
1. Go to this page and download the library: Download pe/component-form-data library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pe / component-form-data example snippets
// Parse data
$data = new FormData(
$_SERVER['CONTENT_TYPE'],
file_get_contents('php://input')
);
// Get $_FILES compatible array
$data->getFILES()
// Get $_POST compatible array
$data->getPOST()