PHP code example of jdwx / web
1. Go to this page and download the library: Download jdwx/web 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/ */
jdwx / web example snippets
$req = Request::getGlobal();
# Returns a Parameter or null if the parameter is not set.
$param = $req->get( 'param' );
# Returns a Parameter or throws an exception if the parameter is not set.
$param = $req->getEx( 'param' );
# Get a parameter as a string, exploding if either assumption (that it
# exists and is a string) is false. (See jdwx_param for other types and
# conversions available.) This is the most common idiom for getting
# parameters from the request safely.
$param = $req->postEx( 'param' )->asString();
# Get the contents of a file upload without moving it to a permanent location.
$param = $req->FILES()->fetchAsString( 'file_param' );
bash
composer