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, 1 1594
On Fri, 04 Jan 2008 20:27:02 +0100, shyee <we******@gmail .comwrote:
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?
The ^M is afaik a representation or \r, so take care of proper line
endings (or strip \r). If your format also has 'disappeared', I can't tell
you anymore about it without any output, so show us what else is wrong. An
URL of some sample data could be more appriopriate as it may be a
character set issue.
--
Rik Wasmus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: john bailo |
last post by:
For a c# program to automatically extract information from email attachments
using the Outlook 9 OM, rather than saving to a file, then reading the file,
I would prefer to 'Save' the attachment to a string variable.
The OM says that .SaveAsFile returns void. The input parameter is a
string.
Is there any way I could somehow 'fool' this method to 'save the file to
string' variable so I don't have to then, open the file and read it back...
|
by: Gerald Maher |
last post by:
Hi
Reading in XML file, changing elements and saving back to the file,
how can i do that, I want to be able to read an XML file and read out
Elements. for example
<name>Tom</tom>
When I read from a file i want to save the XML document in memory of
the computer and when i am finished flush it back to the file, that
|
by: dale zhang |
last post by:
Hi,
I am trying to save and read an image from MS Access DB based on the
following article:
http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp
Right now, I saved images without any errors. After reading the ole object
from db, I saved it to C: as file1.bmp and displayed on the web. But it can
not be displayed. After I manually sent the file to wordpad, it shows
|
by: andy_ro |
last post by:
Hi group,
I have an web application where the user can upload a pdf file. This file is
stored in a table, in a column of type ntext.
The user can later request the content of this column, and the application
should open a new page and load the pdf content.
My problem:
If I read the uploaded pdf file into a string variable and then I
response.write it right away to another page, it shows fine (I can see a pdf
|
by: Dan DeConinck |
last post by:
Hello,
I want to save the position of all the controls on my form. I would like to
write them out to a preference file.
I have done this in DOS BASIC like this:
TO WRITE the preference
open "c:\preferences.txt" for input as #1
input #1 ,a,b,c
| |
by: Tom |
last post by:
I have a large application; lots of forms, multiple dynamic DLLs, etc. I
also have, in the appliation, a general 'Preferences' class object (which is
in itself a separate DLL, and I just include a reference to it so I can
instantiate it at the beginning) which stores all my user preferences. I
serialize the data to and from an XML file, thereby saving and restoring the
user preferences with ease. I also have a Preferences form that the user...
|
by: TheGanjaMan |
last post by:
Hi everyone,
I'm trying to write up a simple image stamper application that stamps the
Exif date information from the jpegs that I've taken from my digital
camera and saves the new file with the date stamped on the lower right
part of the picture. (I'm not an advanced programmer so my code may not
be 100% efficient - sorry, I'm still learning)
Everything works fine until the saving part. I've been able to read the
file into a...
|
by: Pedro Leite |
last post by:
Good Afternoon.
the code below is properly retreiving binary data from a database and saving
it. but instead of saving at client machine is saving at the server machine.
what is wrong with my code ??
thank you
Pedro Leite From Portugal
------------------------------------
|
by: Jeff |
last post by:
Hey
(and thank you for reading my post)
In visual web developer 2005 express edition I've created a simple website
project..
At this website I want users who register to be able to upload a picture of
themselves to their profile... I admit that I'm a newbie... but this is how
I understand this:
|
by: pozze |
last post by:
Hi,
I've just made the change from ASP to .net.
I have a file (code below) that saves a user submitted file to a MS SQL 2005 database. It collects the file name, file size, file type, and lastly the binary data for the file.
I can sucessfully take the files out of the databse again and display them in a data grid.
I would like to resize the submitted file to a fixed size (say 180 x 120) before I upload it to the database and do this without...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |