I have a file file_to_include.php
that contains variable definitions,
define("NAME", "John Doe");
But when I try to include it in my other file, index.php
, using
include_once 'file_to_include.php';
and then echo my definition in index.php
with
echo NAME;
All I see on the page is NAME
, not John Doe
.
I think definitions are global, what am I doing wrong?