mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-10 15:54:01 +02:00
Use utf8mb4 instead of utf8 in MySQL database connection string
This commit is contained in:
@@ -48,7 +48,7 @@ logic in and you have a "View", which is very nearly [MVC] - a common OOP archit
|
||||
|
||||
{% highlight php %}
|
||||
<?php
|
||||
$db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'password');
|
||||
$db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8mb4', 'username', 'password');
|
||||
|
||||
// Make your model available
|
||||
include 'models/FooModel.php';
|
||||
|
Reference in New Issue
Block a user