everluck Posted October 24, 2012 Share Posted October 24, 2012 I have a script written in php (attached below), the content was accidentaly became unreadable, and if I open it with Notepad++, it shows NUL NUL NUL NUL (text color: white, background color: black). It happened because I did force shut down while the script proccessing and my laptop freeze up. Is it true that the file turned into binary file (nul byte)? How could it be? And the most important for now, how do I restore it to string file or readable again? sorry for my bad english, thanks for your help regards class.php Quote Link to comment https://forums.phpfreaks.com/topic/269856-do-you-guys-know-about-nul-byte-characters-help-d/ Share on other sites More sharing options...
dannon Posted October 24, 2012 Share Posted October 24, 2012 Every file is a binary file as they are made out of 1s and 0s. I don't think it is possible to restore it as it is filled with 0s and there is no way to tell what has been there. Quote Link to comment https://forums.phpfreaks.com/topic/269856-do-you-guys-know-about-nul-byte-characters-help-d/#findComment-1387436 Share on other sites More sharing options...
everluck Posted October 24, 2012 Author Share Posted October 24, 2012 yep sorry my mistake, newbie here hehe yah I think so, nul means nul, null means null thanks man Quote Link to comment https://forums.phpfreaks.com/topic/269856-do-you-guys-know-about-nul-byte-characters-help-d/#findComment-1387440 Share on other sites More sharing options...
Christian F. Posted October 24, 2012 Share Posted October 24, 2012 NULL == NUL == \0, just different ways of writing it depending upon the context. Quote Link to comment https://forums.phpfreaks.com/topic/269856-do-you-guys-know-about-nul-byte-characters-help-d/#findComment-1387447 Share on other sites More sharing options...
everluck Posted October 24, 2012 Author Share Posted October 24, 2012 yes, i mean empty is empty, if it is nul, so it is nul, it can not be restored because it is already empty Quote Link to comment https://forums.phpfreaks.com/topic/269856-do-you-guys-know-about-nul-byte-characters-help-d/#findComment-1387469 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.