| | #1 |
| Active Warrior Join Date: 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: 2009 Location: Cardiff, United Kingdom
Posts: 760
Thanks: 159
Thanked 144 Times in 99 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) |
| Plagiarism Guard - Protect Against Content Theft
| |
| |
| | #3 |
| Advanced Warrior War Room Member Join Date: 2009
Posts: 772
Thanks: 4
Thanked 38 Times in 31 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: 2009
Posts: 71
Thanks: 2
Thanked 6 Times in 5 Posts
| |
| |
|
| Bookmarks |
| Tags |
| global, php, variables |
| |