Jump to content

private $db_host; <-------- declaration gives me an error!


Tuskony

Recommended Posts

I have a class defined as:

 


define('DEF_HOST', 'localhost');
define('DEF_USER', 'MyUserName');
define('DEF_PASS', 'MyPassword');
define('DEF_DB',   'MyDatabase');

class CDatabase {

private $db_user_name;

....

}

 

That line, private $db_user_name, gives me the following error:

 

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/share/pear/xxxxxx/CDatabase.php on line 10

 

Link to comment
https://forums.phpfreaks.com/topic/133959-private-db_host/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.