Hi all,
I'm having some trouble here and I hope you can help. I'm writing a class
for PHP to help track includes in a c++ source file. My class has 3
member variables:
a filename
file contents
array of files that file includes
The class definition looks like this
[EMAIL PROTECTED] wrote:
snip
Here's the problem. In ParseFile I call the function:
array_push($this-$includedFiles, $ifName);
Here you have it ending in an 's'
where $ifName is the name of an include file I found in the code. However,
I get an error stating the first argument must be an
From: [EMAIL PROTECTED]
class clsfTreeNode
{
//member variables
var $fName;
var $fData;
var $includedFiles;
//constructor
function clsfTreeNode( $fileName )
{
$this-$fName = $fileName;
$this-$fData = file_get_contents($this-$fName);
$this-ParseFile();
You have an extra $ sign
John W. Holmes wrote:
snip
You have an extra $ sign in your variables names.
$this-fName instead of $this-$fName
Not sure if that'll solve all your problems, but it's a start.
---John Holmes...
Oh, sure. Point out what I missed in my eval. ;)
--
By-Tor.com
It's all about the Rush
On Wed, 28 Jan 2004 [EMAIL PROTECTED] wrote:
in php you have to access a member variable (or methods) with:
$this-varname (without the $)
e.g.: $this-includedFile = array();
hope this helps
AHA! I think that's it. The comment someone sent to me (Sorry, i'm awful
with names) about
5 matches
Mail list logo