With all the problems with having register_global s = on, I propose the
following idea:
We define register_global s_manual = on as a new configuration default.
What this does is enable 3 new explicit variable declaration mechanisms
with the same syntax as the existing static and global mechanisms.
They would be httpget, httppost and session, so for example:
httpget $user_id;
httppost $credit_card;
session $really_importa nt_stuff;
Each of these declaration lines would effectively enable
register_global s for one specific variable in one particular method
(GET, POST or session).
Creative suggestions, comments would be welcome.
--
Spam:newsgroup( at)cr*********@ verisign-sux-klj.com
EMail:<01100011 001011100110001 001110101011100 10011010110
110010101000000 011000110111001 001100001011110 10011011100
110000101110010 001011100110001 101101111011011 0100100000>
Jul 17 '05
50 3776
On Thu, 09 Oct 2003 07:50:03 +1300, Jochen Daum wrote: On Wed, 08 Oct 2003 09:11:23 -0300, Gerhard Fiedler <me@privacy.net > wrote:because it helps me to make much safer code.
However, I don't understand how register_global s could help writing safer code.
Me neither. But it is a method of producing bug free code, because it minimizes globals.
Can you please explain how the use of register_global s minimizes
globals? As I see it, it creates a bunch of globals that otherwise
wouldn't exist. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dalan |
last post by:
I have been using a module for printing labels in Access 97, and
although it works fine, I would like to add a small enhancement to it.
The module allows for setting the number of labels to print and/or to
skip; however, the Cancel command button does not function, nor does
clicking the X-close. Clicking either one is the same as clicking the
OK button.
Since the module creates and displays the dialog box, I will need a
piece of code to...
|
by: cody |
last post by:
What about an enhancement of foreach loops which allows a syntax like that:
foeach(int i in 1..10) { } // forward
foeach(int i in 99..2) { } // backwards
foeach(char c in 'a'..'z') { } // chars
foeach(Color c in Red..Blue) { } // using enums
It should work with all integral datatypes. Maybe we can step a bit further:
foeach(int i in 1..10, 30..100) { } // from 1 to 10 and 30 to hundred
|
by: WXS |
last post by:
Sometimes a method in a class requires the use of class instance
variables/fields that will not be used outside of the method itself.
Currently this means you must create a instance field in the class such that
from a maintenance stand point it is disconnected from the method, and also
affords the opportunity for other methods to mess with the variable when they
never should.
For example:
public class MyClass
|
by: WXS |
last post by:
I know this sounds contrary to the idea of an interface, but read this and
see what you think.
-----------------------------------------------------------------------------------------
It would be nice if there was a way for a class to create a special type of
interface, a private one. Private meaning it's not directly exposed at the
class level, you need to be explicitly handed a reference to it by the class.
Often the encapsulation issue...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |