第一种是添加html标签变为如下格式:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <?php $array = array("12",345); echo is_array($array); $atr = "北京 顺平 天津 宋江"; $str = explode(" ", $atr); foreach($str as $hello) { echo $hello; } ?> </body> </html>
第二种是直接在PHP文本中添加:
header("content-type: text/html; charset=utf-8");
<?php header("content-type: text/html; charset=utf-8"); $array = array("12",345); echo is_array($array); $atr = "北京 顺平 天津 宋江"; $str = explode(" ", $atr); foreach($str as $hello) { echo $hello; } ?>
时间: 2024-10-11 01:27:34