Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php class Banco
- {
- private $_host = 'localhost';
- private $_user = 'root';
- private $_pass = 'usbw';
- private $_database = 'funilaria';
- public $_con;
- function __construct()
- {
- $this->conecta();
- }
- function conecta()
- {
- $_con = mysql_connect($this->_host, $this->_user, $this->_pass) or die("Erro ao conectar ao servidor » " . mysql_error());
- $_con = mysql_select_db($this->_database) or die("Erro ao selecionar o Banco de Dados » " . mysql_error());
- return $_con;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement