标题: If...Else的php语法求助
作者: 13126067871 @Ta
时间: 2014-07-02
『回复列表(7|隐藏机器人聊天)』
<html>
<body>
<?php
$file = "1.txt";
$d=date("m");
if ($d=="7")
{
unlink($file);
echo "文件已删除!";
}
else
{
echo "文件尚未过期!";
}
?>
</body>
</html>
//php页面为utf编码
header("Content-type: text/html; charset=utf-8");
//php页面为gbk编码
header("Content-type: text/html; charset=gb2312");
//php页面为big5编码
header("Content-type: text/html; charset=big5");
<META http-equiv="content-type" content="text/html; charset=xxx(此处改为相应的编码)">