- 0
php Accessing global variables inside an autoloader class?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 3 answers
- 3,248 views
-
QNAP issues patch for an RCE security vulnerability affecting PHP in NAS Drive management
By Alap Naik Desai,
- remote code execution
- rce
- (and 12 more)
- 0 replies
- 6 views
-
Get this Dynamic 2022 Data & IT Security Training Bundle at 97% off
By News Staff,
- neowin deals
- cyber security
- (and 4 more)
- 0 replies
- 6 views
-
Save 98% off this 27 Course Premium Learn to Code Certification Bundle
By News Staff,
- neowin deals
- coding
- (and 10 more)
- 0 replies
- 9 views
-
Get the Complete 2021 Superstar Backend Developer Bundle for only $39.99
By News Staff,
- neowin deals
- sponsored
- (and 7 more)
- 0 replies
- 321 views
-
Question
game_over
I have created a database class but it's not picking up the variables from my config file, i can't seem to get my head around it. I've snipped a lot of the code to keep it simple
index.php (requires the config file and attaches the config to the main file
my config file has an array.
Now whenever i try to use something like $this->config['db_user'] it can't be found and throws an error.. i've tried adding global $config; into the class and the constructor, still nothing.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts