PHP code example of pagemill / action
1. Go to this page and download the library: Download pagemill/action 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/ */
pagemill / action example snippets
use PageMill\Action\Action;
$action = new Action(
"GET",
"/",
[]
);
$action->set_domain(function($a, $b, array $c) {
return ["Hi!"];
});
$action->set_responder(function(array $data) {
echo $data[0];
});
$action->__invoke();