PHP OOP generates a paragraph in html
I have a problem with oop in PHP! I hope you can help me ;)
This is in my index.php
<?php
require_once("classes/mysql.php");
$db = new db_connect();
$db->connect();
?>
<!DOCTYPE html>
<html lang="de">
etc.
and this is in my class mysql.php
class db_connect {
function connect() {
// Connect to database
$connection = mysql_connect('localhost','XXXXXX','XXXXXX') or die
("Error Connection");
$mysqldb="wiki"; // Gewuenschte Datenbank angeben
mysql_select_db($mysqldb, $connection) or die("No database");
mysql_query("SET NAMES utf8",$connection);
}
}
Do you have any idea why this creates a paragraph at the beginning of the
html document?
No comments:
Post a Comment