You are here: Re: Create only one instance of Object « All PHP « IT news, forums, messages
Re: Create only one instance of Object

Posted by J.O. Aho on 03/09/07 13:44

Rik wrote:
> J.O. Aho <user@example.net> wrote:
>> if(_MYSQL_CLASS) { return; }
>> define(_MYSQL_CLASS,true);
>
> Hmmmz, allthough a cluttering of constants, a bit more elegant indeed.
> I'd use defined(_MYSQL_CLASS) though, else it will never ever create an
> object for you if not previously defined to false :P

You are so right, didn't think of that, don't use define that much myself and
those times I do, it's usually a string that I want to output.

--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация