|
Posted by Kimmo Laine on 12/10/05 17:47
<passat91@sympatico.ca> kirjoitti
viestissδ:N8Bmf.10364$kt5.940919@news20.bellglobal.com...
> If this the case on $_POST and $_REQUEST mambo jambo, what happened to the
> practical programming practices on reusing code? Here is my explanation.
> Let say your existing projects in php are 100 and each project has 1000
> code of lines. To be more realistic, let say you only have to modified 25%
> in one project, just to add this "$_POST and $_REQUEST" on every line
> containing the word $variable. IMAGINE HOW MUCH TIME AND EFFORT A PERSON
> WOULD SPEND EDITING EVERY SINGLE PROJECT. IMAGINE IF THERE ARE A COUPLE OF
> THOUSANDS PHP FILE TO EDIT.
>
> IS JUST BECAUSE PHP HAS A NEED TO PUT SHARPER FANGS, BIGGER CLAWS AND MORE
> SPEED, IS NOT NECESSARILY EVERYBODY HAVE TO SUFFER.
Dude, it's a setting that you can turn on. If you have thousands of lines of
code and you upgrade to a version of php that by default sets
register_globals off, then you fucking edit the one line in php.ini to use
register globals and all your files work perfectly. Nobody has to suffer and
ruin a perfectly good project because of this. It's an configurable feature
that increases security of the application (in cases leading to false sense
of security) but the bottom line is that you don't have to use it if you are
the administrator of the server. There's no need to whine and complain about
it, just open php.ini, edit register_globals=on, save the file, reboot the
server and shut up.
--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid>
Navigation:
[Reply to this message]
|