I'm using a PHP structured project
index.php
<?php
require 'vendor/autoload.php';
$dotenv = new Dotenv\Dotenv( "C:/env" );
$dotenv->load();
define('VARIAVEL', getenv( 'NOME_DA_VARIAVEL' ));
echo VARIAVEL."<br>";
echo "<a href='1.php'>a</a> ";
?>
1.php
<?php
echo VARIAVEL;
?>
I would like the constant variable defined in the index to serve the entire project