Reply to Re: include file in class

Your name:

Reply:


Posted by Janwillem Borleffs on 10/09/28 11:36

Carramba wrote:
> include 'somefile.php'; //have getObj() with returns object
>
> class myClass {
> var $var;
>
> function myClass() {
> $var = getObj();
> }
> }
>
> then I was trying to use $this->var I ll only get error about unknown
> variable var
>

Using: $this->var would be correct. When this triggers errors, the getObj()
function should be examined.


JW

[Back to original 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

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