Reply to Re: [PHP]PHP Syntax Notation

Your name:

Reply:


Posted by "Larry E. Ullman" on 09/27/05 20:09

> I'm trying to expand my understanding of PHP by looking at some pre-
> built code modules. I don't fully understand the syntax "$site->Run
> ();" in the following code. Can someone offer a helpful explanation?
>
> <?php
>
> //define("PB_CRYPT_LINKS" , 1);
> define("_LIBPATH","./lib/");
> require_once _LIBPATH . "site.php";
>
> $site = new CSite("./site.xml",true);
> $site->Run();
>
> ?>

The $site variable is an object, specifically an instance of the
CSite class. Run() is a method (i.e., a function) defined within this
class, so the statement $site->Run() executes that function. This is
basic object oriented stuff which you may not have run across before.

Hope that helps,
larry

[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

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