did not switch on or die command in php -


I have written this code. But they did not work well. This is some of these errors:

WARNING: mysqli_connect () [function.mysqli-connect]: php_network_getaddresses: getaddrinfo Fail: Such a host is not known in C: \ wamp \ www. ..

and some time it appears T_EXIT error My problem is in "or die" command that it can not be connected to the database, then it is " Or die "; The program ends but it was not how can I fix it?

  $ dbc = mysqli_connect ('localhost', 'user', 'pass', 'table') or die ('error connecting to mysql server.');    

My problem is in "or die" command that the database Can not connect to it then it should switch to "or die";

Answers come directly from

  $ link = mysqli_connect ('localhost', 'my_user', 'my_password', 'my_db'). ); If (! $ Link) {die ('Connect Error (' Mysqli_connect_errno (). ')' .mysqli_connect_error ()); }    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -