You are here: Re: Problem with classes « PHP Programming Language « IT news, forums, messages
Re: Problem with classes

Posted by Jerry Stuckle on 09/24/06 19:46

Colin Fine wrote:
> Jerry Stuckle wrote:
>>>
>>
>> If this is another page (not included in either of the two previous
>> files), then $c is no longer available. At the end of the page it
>> gets destroyed.
>>
> It is another page, but it *is* included in index.php, after
> $c->SayHallo().
>

Then it's not another page. It's just a different file included in the
same page right? It should be available. But without all of the code
involved, any guess would be just that - a guess. There are dozens of
possibilities.

> As far as I can see from
> http://www.php.net/manual/en/language.variables.scope.php, $c should be
> in scope inside another.php. I don't know why it is failing.
>
>> If you must work on the same instance, then you will need to store the
>> object in the $_SESSION in the first page and retrieve in the second.
>>
> This will presumably work, but I do not see why it should be necessary.
>

Well, if it's all included in the same page then you don't need to do it.

>>
>> And P.S. You're English skills are very good.
>>
> Yes, better than you'res, Jerry! ;-)
>
> Colin


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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