开发者

difference b/w &JFactory::getDBO() and JFactory::getDBO()

What is the difference between &JFactory开发者_开发技巧::getDBO() and JFactory::getDBO() in Joomla 1.5?


The difference is not a Joomla one, but PHP. In PHP, the ampersand means that instead of assigning the actual value, the value will be passed by reference. This is important, because you don't want a copy of the database, you want the global database object. Thus, one should use $db =&JFactory::getDBO().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜