You are here: Re: Class function "Undefined Property" error « PHP Programming Language « IT news, forums, messages
Re: Class function "Undefined Property" error

Posted by Marty Meyers on 10/22/32 11:34

Thanks,
The () in the usage was the problem. I thought I had tried that
combination but apparently not.
Marty

"KornetNews" <star@malgum.com> wrote in message
news:dnlglk$knh$1@news2.kornet.net...
> <?
> class Refs {
> function scriptDir() {
> echo "Refs are Here\n";
> }
> }
>
> $ref = new Refs;
> $ref->scriptDir();
>
> ?>
>
> "Marty Meyers" <martym@execpc.com> wrote in message
> news:11psei1iqvetuff@corp.supernews.com...
> > TIA for your help!
> > Using PHP 4.3.9 doing some code cleanup on an existing site.
> > I have reduced the problem to:
> > This File is marty.php:
> > <?
> > class Refs {
> > function scriptDir() {
> > echo "Refs are Here\n";
> > }
> > }
> >
> > $ref = new Refs;
> > $ref->scriptDir;
> >
> > ?>
> >
> > When executed from command line I get the following:
> > PHP Notice: Undefined property: scriptDir in /............./marty.php
on
> > line 10
> >
> > I suspect the problem is an improper setting in php.ini. (SafeMode =
Off)
> >
> > Thanks
> > Marty
> >
> >
>
>

 

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

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