在php头部<?php之前加上代码: <metacharset="utf-8"> <metacharset="utf-8"><?php?>