Re: Writing double-prime to file? [message #184780 is a reply to message #184775] |
Sat, 01 February 2014 12:40 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 2/1/2014 6:37 AM, Adrian Tuddenham wrote:
> 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?
>
>
I've never seen a problem writing double quotes to a file. What does
the file look like if you open it with an editor on the server (or, more
simply, just list it to the terminal) instead of retrieving it with an
ftp program?
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
|
|
|