PHP variable defined in 'parent' file not recognized in 'required' file

前端 未结 3 829
心在旅途
心在旅途 2021-01-22 22:53

I am trying to access a variable defined in parent file from inside the required file, like this:

<<< parent.php >>>

$controller = \'index\         


        
3条回答
  •  鱼传尺愫
    2021-01-22 23:14

    Alright, Got the issue here. It was a mistake of mine, I guess. The error was not in the above lines, but somehow another variable was rather than accessing the parent php, was accessing the child php directly.

    So, guess, it works out now, why the variables were not available.

提交回复
热议问题