-4

Getting error on line 4. why? i am trying to connect to mysql database and see either it connected or not. i am not getting any result.

jcon.php

 <?php 
    require 'config.php';
    $con=mysqli_connect(HOST,DBUSER,DBPASS,DB);
    if(mysqli_connect_errno($con)){
        echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    else{ echo "mysql connected succesfully";}
    ?>

config.php

<?php
define( "HOST","localhost");
define ("DB","share");
deifne ("DBUSER";"root");
define ("DBPASS"; "" );
?>
4

1 回答 1

5

deifne ("DBUSER";"root");似乎有问题

于 2013-05-03T23:30:24.747 回答