PHP code example of phpgt / input
1. Go to this page and download the library: Download phpgt/input 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/ */
phpgt / input example snippets
$profile->update(
$profileId,
// Use type-safe getters to help write maintainable code.
$input->getString("name"),
$input->getInt("age"),
);
// Handle multiple values with type safety.
foreach($input->getMultipleString("interest") as $interest) {
$profile->addInterest($interest);
}
// Handle file uploads with a FileUpload object.
$photoUpload = $input->getFile("photo");
if($photoUpload instanceof FailedFileUpload) {
// Handle a failed upload here.
}
$photoUpload->moveTo("data/upload/$profileId.jpg");