Home > Backend Development > PHP Tutorial > 个有关问题

个有关问题

WBOY
Release: 2016-06-13 13:28:44
Original
894 people have browsed it

请教高手个问题
请教高手,我输入一下代码后显示出"???今天是???呵呵"请问这是什么问题?我使用的编码是utf-8,我是用的环境是appserv
setlocale(LC_TIME,"chs");
$weekday=strftime("%A");
echo $weekday;
switch($weekday)
{
case"星期一":
echo"今天是".$weekday."新的一周开始拉";
break;
case"星期二":
echo"今天是".$weekday."保持昨天的好状态";
break;
case"星期三":
echo"今天是".$weekday."真快啊,过去1/2周了";
break;
case"星期四":
echo"今天是".$weekday."还有一天放假拉";
break;
case"星期五":
echo"今天是".$weekday."呵呵,明天有什么安排呢";
break;
default:
echo"今天是".$weekday."呵呵";
break;

}

------解决方案--------------------
please change your PHP charset utf-8.
or 
save as a utf-8 size
------解决方案--------------------
难道不对吗?

setlocale(LC_TIME,"chs");
本地化到中国
难道中国的语言不是汉语,编码 GBK 吗?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template