On Thu, Jul 16, 2009 at 9:53 AM, Govinda wrote:
>
> On Jul 15, 2009, at 3:28 PM, tedd wrote:
>
>> My way -- every time I open a database, I do so by including the
>> configuration.php file that holds the logon/password et other data to
>> connect with the database. When I'm done with what I want fr
On Jul 15, 2009, at 3:28 PM, tedd wrote:
My way -- every time I open a database, I do so by including the
configuration.php file that holds the logon/password et other data
to connect with the database. When I'm done with what I want from
the database, I close it.
If one does not close i
At 12:21 PM +0200 7/14/09, Anton Heuschen wrote:
In my index.php page I then use $dbconnect again but do I simply use
$dbconnect again ... or must I say global $dbconnect and then use it in the
rest of the DB calls? or use GLOBALS ..
Anton:
My way -- every time I open a database, I do so
do you need to use global?
IMO you should use just 1 global variable, thats is what I call "entry point"
My scripts looks like...
require_once 'loader.php';
Loader::registerAutoload();
$foo = new Foo();
$foo->doStuff();
This way you can develop faster and do maintenance better avoiding
problems
> Oh and if one class uses methods in another class do I instansiate a
> new object of the other class I have seen use of OtherClass::Method
> is this better method of $obj = new OtherClass() use
The :: is used to access static methods of a class. Static methods can
be used withou
On Tue, Jul 14, 2009 at 6:21 AM, Anton Heuschen wrote:
> This is just a general question,
>
> I am not 100% on when to use global $var , and $this->var and how/what
> about the GLOBAL vars
>
> Lets say I have one file I call config.php here I connect to the db, to
> ldap etc the con
6 matches
Mail list logo