ydhcui
2015-09-10 12:47:44 +08:00
<?php
error_reporting (E_ALL ^ E_NOTICE );
date_default_timezone_set ('PRC'); //设置为北京时间
if ( isset ($_REQUEST['c']) )
{
$Name = $_REQUEST['name'];
setcookie ("name", $Name, time ()+(365 * 24 * 60 * 60 )); /* expire in 1 year */
$items = $_REQUEST['items'];
setcookie ("items", $items, time ()+(365 * 24 * 60 * 60 )); /* expire in 1 year */
$roomname = $_REQUEST['roomname'];
setcookie ("roomname", $roomname, time ()+(365 * 24 * 60 * 60 )); /* expire in 1 year */
if (isset ($_POST['AudioNty'])||isset ($_GET['AudioNty'])){
$AudioNty='checked';
}
if (isset ($_POST['VibrateNty'])||isset ($_GET['VibrateNty'])){
$VibrateNty='checked';
}
if ($items <1 ){$items = 1;}
$txt=$_REQUEST['c'];
//取消 PHP 自动把"变成 /"
$txt=stripslashes ($_REQUEST['c']);
$txt=nl2br ($txt );
//写入消息到文件
$roomname = iconv ("UTF-8", "GBK", $roomname );
if (file_exists ("msg/room-$roomname.html")==FALSE ) {//如果此房间不存在 则创建并写入下面 5 条说明信息 可解决无文件引起的 PHP 错误
$HelpInfo = "<b>Jungle </b>".date ("m-d H:i:s")."<br>Hi ,感谢使用 HiMsg<hr>
chat-js.php 文件
任意文件读取喔。~~