Guest User

Untitled

a guest
Jan 17th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. <?php
  2. class MyClass {
  3. const DB_NAME = "MyDb";
  4. const HOST = "localhost";
  5. const USER = "abcdef";
  6. const PASSWORD = "ghijklmn";
  7. protected static $MyString;
  8.  
  9. public static function getString() {
  10. if (self::$MyString == null)
  11. self::$MyString = file_get_contents('log.txt');
  12. return self::$MyString;
  13. }
  14. }
  15.  
  16. echo MyClass::getString();
  17. ?>
Add Comment
Please, Sign In to add comment