I have a php class, this is a fragment of him:
<?
class labelUpdater
{
private static $link = mysql_connect("localhost", "login", "password");
if (!$link) {
die('Connection error: ' . mysql_error());
}
echo 'Success';
mysql_close($link);die;
}
?>
When I launch it, I'm getting this:
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /var/www/..../labelUpdater.php on line 6
What I'm doing wrong?