Best unofficial Apache Server developers community |
|
Hi, I wanted to know how files are included in php. What I mean by that is that how the variables from the included files are imported and how the included file is able to use the variables from the main file. I was creating a templating system and the problem was that I had an index file which included the other files such as config.php etc. But then depending on the page requested the index.php contained the template files too. But for some some reason I wasnt able to use the variables from the config file from in the template.php file
posted via StackOverflow
|
|
 
|
below is
below is
simple one from http://php.net/manual/en/function.include.php declaring
take a look at this http://php.net/manual/en/language.variables.scope.php |
|
 
|
Variable scope is inherited. You can even return a value from an See http://php.net/manual/en/function.include.php for more information. |