Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一个在 UTF8 Unicode 系统上运行良好的简单 PHP 和 MySQL 源代码。请给我最简单的源代码,它在 UTF8 Unicode 上 100% 有效。
只需告诉 mysql 和 php 你使用的是 utf-8:
<?php mb_internal_encoding("UTF-8"); $db = new PDO('mysql:host=localhost;dbname=testdb;charset=UTF-8', 'username', 'password'); ?>