Class 'mysqli_connect' not found

前端 未结 2 440
眼角桃花
眼角桃花 2020-12-30 17:24

Okay so this is my problem now. I am using PHP 5.5.12 and MySQL 5.6.17. The php mysqli_connect is checked on my php settings but still getting error. ANy help? Thanks in adv

相关标签:
2条回答
  • 2020-12-30 17:49

    You should do :

    $link = mysqli_connect ("localhost", "root", "", "towertec_master");
    // without new
    
    0 讨论(0)
  • 2020-12-30 17:57

    mysqli_connect is a function, not a class. What you want is either:

    $link = mysqli_connect(...);
    

    or

    $link = new mysqli(...);
    

    Both are equivalent.

    0 讨论(0)
提交回复
热议问题