Hello everyone.
Here is my quetsion.
This is sypposed to replace the $DELETEPOINTS with $EMPTY.(Some kind of delete)
For some reason it deletes the end of every line ('😉 in conf.php
if (isset($HTTP_POST_VARS["rdel"])){
$EDIT_FILE = "C:\MySites\bookstore\Admin\conf.php";
$file_array = file($EDIT_FILE);
$file = join ("", $file_array);
if ($HTTP_POST_VARS['entry'].checked == true ){
$ArrayNum = $HTTP_POST_VARS['entry'];
}
$EMPTY="";
$DELETEPOINTS = "\$writer .= '$WriterArray[$ArrayNum]|';";
echo"$DELETEPOINTS";
$file = preg_replace("/$DELETEPOINTS/", $EMPTY, $file);
$fp = fopen("$EDIT_FILE", "w");
flock($fp, 1);
fputs($fp, $file);
flock($fp, 3);
fclose($fp);
}
Any ideas?