Tuesday 8 January 2019

sql server - is there any func to set extension=php_mssql.dll without editing in php.ini using functions like we used ini_set(); method


$con=mysql_connect('$url','$dbuser','$dbpass');

if(!$con){
die('cannot establish connection:'.mysql_error());
}
$db=mysql_select_db("$db");
if(!$db){
die('cannot found database:'.mysql_error());

}
?>


Giving warnings :-




Warning: mysql_connect(): php_network_getaddresses: getaddrinfo
failed: No such host is known. in D:\xampp\htdocs\connection.php on
line 3




Warning: mysql_connect(): php_network_getaddresses: getaddrinfo
failed: No such host is known. in D:\xampp\htdocs\connection.php on
line 3 cannot establish connection:php_network_getaddresses:
getaddrinfo failed: No such host is known.




Can anyone help ?

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...