![]() | | ||||||||
| | #1 |
| Active Warrior Join Date: May 2009
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
|
I'm developing an e-commerce site involved with a lot of database access and naturally I want to keep the DB access to a minimum. Keeping some information in a server buffer definitely helps. I do have about 10 PHP script files for the entire site. Do you know if variables declared outside of functions in PHP modules are considered as global variables and accessible from any executing PHP scripts? Thanks, Warren |
| | |
| | #2 |
| Advanced Warrior War Room Member Join Date: Aug 2009 Location: Cardiff, United Kingdom
Posts: 772
Thanks: 171
Thanked 147 Times in 103 Posts
|
If they are declared outside any functions or loops then yes, they'd be considered as global vars and could be used anywhere (as far as I know) |
| "If you are clear where you are going and you take several steps in that direction every day, you eventually have to get there." | |
| | |
| | #3 |
| Advanced Warrior War Room Member Join Date: Sep 2009
Posts: 653
Thanks: 2
Thanked 27 Times in 24 Posts
|
you can use php.ini in your root directive to override server php.ini setting not sure about my.cnf file
|
| | |
| | |
| | #4 |
| Active Warrior War Room Member Join Date: Feb 2009
Posts: 50
Thanks: 2
Thanked 4 Times in 4 Posts
| |
| | |
![]() |
|
| Tags |
| global, php, variables |
| Thread Tools | |
| |
![]() |