两种设置php载入页面时编码的方法
时间:2021-03-22 09:08:16|栏目:PHP代码|点击: 次
php载入页面时设置页面编码的两种方法
1:输出meta标签:
1、在php mvc的控制器里面或php页面echo '<meta http-equiv="content-type" content="text/html; charset=utf-8">';
2、在php页面或html页面<meta http-equiv="content-type" content="text/html; charset=utf-8">
2:使用header函数
在控制器或页面里面header("content-type:text/html; charset=utf-8");
上一篇:PHP中cookies使用指南
栏 目:PHP代码
下一篇:php metaphone()函数及php localeconv() 函数实例解析
本文标题:两种设置php载入页面时编码的方法
本文地址:http://www.codeinn.net/misctech/85557.html






