|
Posted by arno.eagleeyes on 05/30/07 22:05
On 30 mei, 23:49, "Edwina Rothschild" <edwinarothschil...@mail.md>
wrote:
> Can anyone explain to me why globals are so bad? I have a $phpEx
> variable in my main config file and i use "global $phpEx" inside of
> certain functions that return links so I don't have to change a
> hundred links if I change my php extension to something else (php4,
> php5). Thanks for the great help everyone! Now if I can just figure
>
> regards,
> Giovanni Macra
Well, as i remember it right, the possibility exists that the value of
your $phpEx can be manipulated by a _GET or _POST request :
http://www.site.com/script.php?phpEx=some_value
Secondly,the risk exist (especially if your app grows bigger) that you
accidentally use the same variablename...happened to me a few times.
But hey, if you covered all that, then its all a matter of taste i
think.
Greetings
Arno
Navigation:
[Reply to this message]
|