didn't recognize private vars in PHP Class

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
trigunmasteree
Forum Newbie
Posts: 4
Joined: Sat Aug 19, 2006 3:13 am

didn't recognize private vars in PHP Class

Post by trigunmasteree »

Yo,

I'm new in this stuff: OO PHP

When I tried to make class with PHP (with java style and XAMPP platform) it went well.

But when I moved my code right to the real hosting server, the problem happened.

The server didn't recognize internal variable in each class.

class Page
{
private var $loadLoginPad = true; //the part that is not recognized.
private var $loadSearchPad = true; //this too
..........................................
}

What should I do with this? can we still access class internal variables by just declaring it in the function scope? (not it the class scope)

I didn't expect to move my site, so anyone can help?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

lose "var"
trigunmasteree
Forum Newbie
Posts: 4
Joined: Sat Aug 19, 2006 3:13 am

Post by trigunmasteree »

thx, I'll try it
Post Reply