PHP code example of drewcking / nestphp
1. Go to this page and download the library: Download drewcking/nestphp 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/ */
drewcking / nestphp example snippets
\nest\get(function() {
echo "Hello, Nest!";
});
// /before.php
\nest\get(function() { echo "BEFORE (root)<br>\n"; });
// /admin/before.php
\nest\get(function() { echo "BEFORE (admin)<br>\n"; });
// /admin/index.php
\nest\get(function() { echo "index!<br>\n"; });
// /admin/after.php
\nest\get(function() { echo "AFTER (admin)<br>\n"; });
// /after.php
\nest\get(function() { echo "AFTER (root)<br>\n"; });
apache
php_value auto_prepend_file /var/www/html/nest.php