Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection failed: could not find driver
- Fatal error: Class 'mysqli' not found in C:Apache24htdocsconexao_db.php on line 7
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "minha_senha";
- try {
- $conn = new PDO("mysql:host=$servername;dbname=php_db", $username, $password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- echo "Connected successfully";
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- }
- ?>
- include_path = "C:phpincludes"
- extension_dir = "ext"
- extension=D:/PHP/ext/php_mysql.dll
- extension=D:/PHP/ext/php_mysqli.dll
Add Comment
Please, Sign In to add comment