开发者

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

开发者 https://www.devze.com 2023-04-03 16:51 出处:网络
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 assign

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

精彩评论

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