Let me set what I'm trying to do befor discussing the problem:
I'm using windows backup tool in windows server 2000 it outputs a log of what its backed up as a simple txt file: backup01.log
Im getting php to read through the file and grab bits of data that I need and place these bits in a db so that a user can come along and read the contents and be able to determin if backups where successful etc.
so a bit of my php code im using to read each line one at a time is:
So here is the problem. For some reason php is seeing the log file as one long line of data not 100's of lines here is a bit of the log file:
looking at the log file in notepad the data is clearly has new lines. put php is seeing the new lines something else. If I echo out the log in a web browser I get:
looking at the source new lines are showing as ??>
I presume this is a charset problem here, but im really lost with what charset I should set the php file to and how I do this? Do I set it as:
if so what char set should I set it to, what charset does windows backup use in its logs?
Any input is greatly apreciated
Cheers