Can you write to a binary file with php, i don't understand too much php but in c# lets say it goes BinaryWriter BW = new etc... And then you write to a file lets say BW.This write etc... Can you do that with php?
With Ruby i can also write to binary files even it's a interpreted language ;)Quote:
Hi,
I don't think you can do that because PHP is an interpreter language and C# is a compiler language. These are 2 different things.
There are very less operation which work in PHP for binary changes, like bitwise-OR or bitwise-AND.
What do you want to do exactly?
FileStream FS = new FileStream(@"path" + Name + ".usr", FileMode.CreateNew);
BinaryWriter BW = new BinaryWriter(FS);
BW.Write(Password);
BW.Write(Status);
<?php $file = 'people.usr'; $current = chr(3); $current .= "ebago"; $current .= chr(0); file_put_contents($file, $current); ?>