Singleton Pattern


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public static function getInstance() {
  2. if(!is_a($_SESSION["MTVUsers"], "MTVUsers") || HTTPCache::shouldBeNoCache()) $_SESSION["MTVUsers"] = new MTVUsers($_SERVER['DOCUMENT_ROOT']."/capital_invest_de/Login/Users/Users.csv", "Username", "Password");
  3. return $_SESSION["MTVUsers"];
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.