PHP code example of 9kinc / easyphpenvpp
1. Go to this page and download the library: Download 9kinc/easyphpenvpp 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/ */
9kinc / easyphpenvpp example snippets
//file_dir = '.env';
$easyenv = new \EasyPHPEnvPP\EasyPHPEnvPP($file_dir);
echo "<pre>";
print_r($easyenv->print_data());
echo "</pre>";
// ## functions
// $easyenv->get_file_found(); # Use this to see if file was found
// $easyenv->get_data_list(); # Array with key and value data inside , use for loop to get these values!
// $easyenv->get_errors(); # Array containing all the errors
// test
echo "<hr> Key APP_URL: " .$_ENV["APP_URL"];
echo "<hr> Key APP_NAME: " .$_SERVER["APP_NAME"];