Posted by Mike Willbanks on 12/23/05 02:43
Marty,
> 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)
Wrong....
The problem is that you created a function not a variable...
The proper way would to be:
$ref = new Refs;
$ref->scriptDir();
Mike Willbanks
http://blog.digitalstruct.com
Navigation:
[Reply to this message]
|