Writing double-prime to file? [message #184775] |
Sat, 01 February 2014 11:37 |
adrian
Messages: 27 Registered: December 2012
Karma:
|
Junior Member |
|
|
I am trying to write a series of programs which create a file from a
string which has been Copied from a spreadsheet. It is Pasted into an
HTML Form and passed through various checking routines. Finally it is
written to a file.
If the string contains a double-prime character (double quotes) the
character and the rest of the string after that point do not appear to
be written to file.
The program displays the string just after the "write to file" lines
and it is still unchanged. Either a problem is occurring during the
writing phase or that character is making the rest of the file
unreadable. (I view the file contents in Fetch v3.0.3)
The data string is held in the variiable '$txt' and the write command
is:
~~~~~~~~
$fh = fopen($fileURL, 'w') or die("<FONT
COLOR=\"#CCFFFF\"><B>PayFileGen2 can't open file $fileURL</B></FONT>");
fwrite($fh, $txt);
fclose($fh);
~~~~~~~~
Is that character known to cause a problem and is there a
straightforward way around this?
--
~ Adrian Tuddenham ~
(Remove the ".invalid"s and add ".co.uk" to reply)
www.poppyrecords.co.uk
|
|
|