Troubleshooting unexpected T_PUBLIC error

binskarleone

New Member
I get this error... \[quote\] Parse error:syntax error, unexpected T_PUBLIC in C:\filename here on line 12\[/quote\]On this line....\[code\]public static function getInstance(){\[/code\]The code...\[code\]<?PHPclass Session{ private static $instance; function __construct() { { session_start(); echo 'Session object created<BR><BR>'; } public static function getInstance(){ if (!self::$instance) { self::$instance = new Session(); } return self::$instance; }}\[/code\]
 
Back
Top