Take a look at the code below:
This code is part of my class. I first include the file "extension.inc" and get the value of $php_ex. Then I assign this value to the class variable php_ex (so I can use it in other functions of the class without having to include extension.inc again). At the time the value of $php_ex is ".php". However whenever I try to run the script I get the following output:PHP Code:
require_once('config.inc' . $this->php_ex);
What am I doing wrong here? I've double checked that config.inc.php exists in the same directory as this script. But as you can see it tries to include "config.inc" and not "config.inc.php" although $php_ex holds ".php".
Edit: I've bleeped out the script name and path above on purpose.