Guest User

Untitled

a guest
Oct 1st, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2. namespace Template;
  3.  
  4. use \PDO;
  5.  
  6. header('Content-Type: application/javascript;');
  7.  
  8. require_once 'template.php';
  9. require_once 'model.php';
  10.  
  11. $conn = new Connection();
  12. $conn->host = "localhost:33306";
  13. $conn->user = "root";
  14. $conn->pass = "root";
  15. $conn->db = "test"
  16. $conn->options = [
  17. PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ
  18. ];
  19.  
  20. $template = new Template($conn);
  21.  
  22. $model = new Model($template->db);
  23.  
  24. $get = $model->get(2);
  25. print_r($get);
Add Comment
Please, Sign In to add comment