|
Posted by Tom on 01/04/08 21:14
On Fri, 4 Jan 2008 11:27:02 -0800 (PST), shyee wrote...
>
>Hi,
>
>Let me explain what I am trying to do first. I want to upload a .csv
>file from a form page to the redhat server.
>Uploading is working fine, I could upload the .csv file to the server.
>But when I open the uploaded file using VI editor in the server, I see
>"^M" characters and all CSV formats are disappeared. Also "fgetcsv()"
>function cannot tell the length of the columns because of the messed
>CSV forrmats.
>
>When I saved the .csv file as Windows format in MS Excel, oh I am
>using MacBook, it keeps CSV format at the server, but php cannot
>access the file.
>
>Anyone have solution this problem?
>
>Big thanks for your help.
>Bless,
From a vi editor, I can create the "^M" using the "Ctrl-V" then "Ctrl-M". If you
want to replace with vi you can try...
:s/^M//
For the "^M" above you would type that using "Ctrl-V Ctrl-M".
Tom
--
Newsguy 20 GB Free Trial Accounts
http://newsguy.com/overview.htm
[Back to original message]
|