通过php的exec函数启动cmd $cmd = "chcp"; //命令行语句 exec($cmd,$result,$state); echo explode(":",$result[0])[1] ;