Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $HOST = "localhost";
- $USER = "root";
- $PASS = "";
- $DB = "banco";
- function conexao(){
- try{
- include_once("defines.php");
- $conn = new PDO("mysql:host=".$HOST.";dbname=".$DB."",$USER,$PASS);
- }catch(PDOException $e){
- $e->getMessage();
- }
- return $conn;
- }
- include "po/config.php";
- $conn = conexao ();
- function notícias($conn){
- // Faz algo
- }
Add Comment
Please, Sign In to add comment