-1
<?php
$myFile = "myfile.txt";
$fh = fopen($myFile, 'rt');
$theData = fread($fh, filesize($myFile));
$aDoor = $_GET['idno'];
echo $aDoor;
$theData = preg_replace('/\n?.*$aDoor.*$/m', '', $theData);

fwrite($fh, $theData);
fclose($fh);
echo $theData;
?>

preg_replace('/\n?. SOMETEXT. $/m', '', $theData); 这是工作

现在如何使用 $aDoor 字符串

4

1 回答 1

0

unset()在php中使用函数

例子

 unset($aDoor);

然后写内容...

于 2013-01-16T11:31:33.013 回答