Guest User

Untitled

a guest
Jan 10th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. $HOST = "localhost";
  2. $USER = "root";
  3. $PASS = "";
  4. $DB = "banco";
  5.  
  6. function conexao(){
  7. try{
  8. include_once("defines.php");
  9. $conn = new PDO("mysql:host=".$HOST.";dbname=".$DB."",$USER,$PASS);
  10. }catch(PDOException $e){
  11. $e->getMessage();
  12. }
  13. return $conn;
  14. }
  15.  
  16. include "po/config.php";
  17. $conn = conexao ();
  18.  
  19. function notícias($conn){
  20. // Faz algo
  21. }
Add Comment
Please, Sign In to add comment