|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-03-26 09:25 UTC] momo@php.net
here is simple code:
----------------
<?
$f = fopen("test.txt","rb");
$buf= fread($f,4096);
$f2 = fopen("test2","wb");
fwrite($f2,$buf);
?>
---------------
where test.txt content is:
--------------test \0 test
--------------
the result test2 file is:
---------------
test ? test
---------------
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jan 20 16:00:01 2026 UTC |
if the stripslashes have to recover the string as it was before addslashes'ing so it fails. all this code looks to me too disordered. for example, into the sybase stripslashes there is the code: ---- if (*t == '\'') { if ((l > 0) && (t[1] == '\'')) { t++; if (len != NULL) { (*len)--; } l--; } *s++ = *t++; --- but this code have nothing with slashes at all! i'll try to learn the subject when i'll find some time for it and do some order.