I am trying to access a variable defined in parent file from inside the required file, like this:
<<< parent.php >>>
$controller = \'index\
That is strange. Try to see if variable is part of defined variables:
$vars = get_defined_vars(); print_r($vars);
Also, If your variable exists in a function, you can globalize it with global keyword.
global