no message
This commit is contained in:
43
user/stop_products.php
Normal file
43
user/stop_products.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
include './sc.php';
|
||||
|
||||
$id = $_GET['id'];
|
||||
|
||||
|
||||
|
||||
// 定义要检查的文件路径
|
||||
$filename = './me/' . $user . '/' . $pass . '/products/'.$id.'.json'; // 目录路径
|
||||
|
||||
if (!file_get_contents($filename)) {
|
||||
echo "无数据";
|
||||
exit;
|
||||
}
|
||||
|
||||
$data = file_get_contents($filename);
|
||||
|
||||
$data = json_decode($data, true);
|
||||
|
||||
$mod = $data['mod'];
|
||||
|
||||
$Main_route = './mods/'.$mod.'/Main.php';
|
||||
|
||||
include $Main_route;
|
||||
|
||||
|
||||
$Re = @stop_product($data);
|
||||
|
||||
if ($Re['code'] != 200) {
|
||||
|
||||
die('Error:'.$Re['msg']);
|
||||
|
||||
}
|
||||
echo '移除成功!';
|
||||
// 编码为 JSON 字符串
|
||||
$data = json_encode($Re, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
// 定义要检查的文件路径
|
||||
$filename = './me/' . $user . '/' . $pass . '/products/'.$id.'.json'; // 目录路径
|
||||
|
||||
echo file_put_contents($filename,$data);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user