473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

fputs of a textarea write a dos file

hi

i have a form with a textarea
on the action page i write its content with fopen and fputs

but it s writing a dos file (i m on a linux server)

thx all
Jul 17 '05 #1
3 1887
cdt sylvestre wrote:
hi

i have a form with a textarea
on the action page i write its content with fopen and fputs

but it s writing a dos file (i m on a linux server)

thx all


What do you mean with "dos file"? Do you meen the end of line symbol \r\n?

If so replace all \r\n with \n before writing the file.

--
-------------------------------------------------------
Try this: SCA the Smart Class Archive for PHP
http://www.project-sca.org
-------------------------------------------------------
Jul 17 '05 #2
*** cdt sylvestre escribió/wrote (Sat, 29 Jan 2005 10:52:05 +0100):
i have a form with a textarea
on the action page i write its content with fopen and fputs

but it s writing a dos file (i m on a linux server)


The form contains what's sent by the client. If it's a Windows browser you
can't force it to write Unix carriage returns. However, you can process the
input in a variety of ways.
--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Manda tus dudas al grupo, no a mi buzón
-+ Send your questions to the group, not to my mailbox
--
Jul 17 '05 #3
thx
"Markus L." <no****@project-sca.org> a écrit dans le message de
news:41***********************@newsreader02.highwa y.telekom.at...
cdt sylvestre wrote:
hi

i have a form with a textarea
on the action page i write its content with fopen and fputs

but it s writing a dos file (i m on a linux server)

thx all


What do you mean with "dos file"? Do you meen the end of line symbol \r\n?

If so replace all \r\n with \n before writing the file.

--
-------------------------------------------------------
Try this: SCA the Smart Class Archive for PHP
http://www.project-sca.org
-------------------------------------------------------

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gadrin77 | last post by:
I noticed when displaying the contents of a CDATA node inside a TEXTAREA using MSXML and XSL, I get an extra space before the data. at first I thought I hadn't "tightened up" the XSL, but then...
11
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom,...
16
by: Jen | last post by:
Hi. I have this problem that I think should be easy but have been struggling with this for days. I have a list based on a recordset from a database. This list consists of records meeting a certain...
4
by: Nate12o6 | last post by:
Mabee you guys can help me with this. I have a form with enctype="multipart/form-data" that has a textarea in it as well as file upload. The text area is for a description of the file. If...
5
by: sunadumari | last post by:
Hi folks, hope I'm in the wright section (I'm a newbie). I've got a textarea that, with the click on a button, shows the html-look of the data in the textarea. This script I found on the net (with...
3
by: saytri | last post by:
I am displaying the contents of a textfile in a textArea. I want that when i edit this text in the textArea it is automatically saved in the textfile. I have wriitten this code, but the problem is...
27
by: Chad | last post by:
Why doesn't fputs() write the null byte when the null-terminted string is written to a stream? I don't see the reasoning behind this. Chad
2
by: Ross | last post by:
When I sometimes want to debug something on a browser without a firebug console, I have been using a textarea to which I can print stuff. So my HTML calls my big script file, and further down in...
9
by: qiqinuinaifen128 | last post by:
Hi Pro, I have a question i have an textarea for user to key in and a button for user to save what they key in into the textarea. if i key in '"\ in to textarea and i press the button save...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.