File: /www/wwwroot/www.jwvfm.com/asp/cdel.php
<?php
/**
* Created by xiaoz.
* User: lenovo
* Date: 2018/10/9
* Time: 14:39
* url:mxcloud.com
* QQ2293640950
*/
include_once 'inc.php';
$id=$_POST['id'];
if(!empty($id)){
$text = file_get_contents('files/orders.txt');
$a1 = "#(.*?)\t(.*?)\t(.*?)\t(.*?)<\/br>#";
preg_match_all($a1, $text, $arr1);
if (!empty($arr1[0])) {
$arr1[0][2] = "2018-10-08 22:30 weinxin aa af 1</br>";
foreach ($arr1[0] as $key => $value) {
$arr1[0][$key] = $arr1[0][$key] . "\r\n";
}
file_put_contents('files/orders.txt', $arr1[0]);
}
}else{
echo "id不能为空,无效操作";
}