Monday, 15 April 2019

php - mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

An error occurred in script 'C:\xampp\htdocs\framework\connect.php' on line 13: 
mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Date/Time: 12-17-2013 15:10:43


how can i solved this problems. i have look around this maybe the php version problem but still can not delete this error message.




/* Database config */


$db_host = 'localhost';
$db_user = '~';
$db_pass = '~';
$db_database = 'banners';

/* End config */


$link = @mysql_connect($db_host,$db_user,$db_pass) or die('Unable to establish a DB connection');


mysql_set_charset('utf8');
mysql_select_db($db_database,$link);

?>

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 ...