Helge Hoivik
|
| Posted: 01/24/2003, 11:35 AM |
|
Have anybody good workarounds for the fact that the PHP community discourages the use of GLOBALS (the REGISTER GLOBALS is set to OFF by default in the PHP config file and the feature will be discontinued in up-coming versions of PHP). Are there changes to CodeCharge itself underway?
|
|
|
 |
Wizywyg
|
| Posted: 01/24/2003, 11:51 AM |
|
I agree, and is the programmers of CCS going to clean up their php coding as well?
Too many queries and variables can make for slow loading pages.
|
|
|
 |
RonB
|
| Posted: 01/25/2003, 6:41 AM |
|
I agree that globals might become a problem in the future but I'm suere they will adapt the code long before it becomes a real problem.
I'm not sure what you mean by cleaning up the code. I think it's pretty clean. My paiges are very fast (php apache mysql) and often contain a lot of custom event codes where I program additional queries. Speed has never beem a problem with the above combination.
Ron
|
|
|
 |
Andrew Carnell
|
| Posted: 01/25/2003, 8:55 AM |
|
There are two commonly used methods for switching register_globals on or off at will. (Obviously,
change the off to on as needed)
The first is to place the following line in a file named '.htaccess' (begins with a full stop)
and upload it to your site:
php_flag register_globals off
This method will affect all files in the same directory and sub directories of the directory in
which you place the .htaccess file.
The second method is to place the following line at the top and bottom of all script files:
ini_set("register_globals", 0);
This method has the advantage that it applies on a script by script basis, rather than covering
wentire directory structures.
|
|
|
 |
Wizywyg
|
| Posted: 01/27/2003, 12:23 AM |
|
"I'm not sure what you mean by cleaning up the code. I think it's pretty clean. My paiges are very fast (php apache mysql) and often contain a lot of custom event codes where I program additional queries. Speed has never beem a problem with the above combination."
The php coding is a bit messy. Take, for instance their Common.php file. The "code" just to query the mysql database is very "long" when it could have been solved in just three lines. 15 lines? To 3 lines if you program in php from scratch. Hopefulle, the programmers of CCS realize that some of their codign is bloated.
|
|
|
 |