"writing" a backspace or del char in a file
| From: | ng | Date: | Fri, 24 Jan 2003 12:23:26 +0000 |
| Subject: | "writing" a backspace or del char in a file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-132981@lists.php.net to get a copy of this message | ||
Hi
i want to erease 'one' or more caracters in a file, so, if this file is too
big ( >10MB ) i don't want to read entirely it to substr(); the last line and
entirely re-write it...
i like to write -at the end by exemple- the char backspace ( 0x08 )
ex :
<?php
$fp = fopen('some_file','a'); // or 'ab'
fputs($fp, sprintf("%c",8));
fclose($fp);
?>
but this simply add the char "backspace" at the end and doesn't delete it !
the same problem appears with the character 127 ( delete ).
i don't really know if that i want is possible ( perhaps with direct i/o
methods ? )
so, please show me the way :)