[PHP] Fwrite() vs file_put_contents()

2009-02-24 Thread Clancy
I have been pondering whether it would be feasible to work with a 100,000 entry index file, and had put yesterday aside to do some timing tests. I first generated some sample index files of various lengths. Each entry consisted of a single line with the form ASDF;rhubarb, rhubarb, where t

RE: [PHP] fwrite() Append Files

2008-06-27 Thread Wei, Alice J.
From: Wolf [EMAIL PROTECTED] Sent: Friday, June 27, 2008 2:18 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] fwrite() Append Files Wei, Alice J. wrote: > Hi, > > Right now I enforced the file to read in through HTTP-Re

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Wolf
Wei, Alice J. wrote: Hi, Right now I enforced the file to read in through HTTP-Request and output it to a local file. Looks like this functioned perfectly after I used append functions after I attempted to write to the file! Thanks to everyone who contributed to this. Alice Are you mak

RE: [PHP] fwrite() Append Files

2008-06-27 Thread Wei, Alice J.
@lists.php.net Subject: Re: [PHP] fwrite() Append Files Jim Lucas wrote: > Wei, Alice J. wrote: >> Hi, >> >> This is my current code: >> >>$lines = file("http://www.mysite.com/hello.txt";); >> >>$file="http://www.mysite.com/hello.txt";; &g

Re: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files

2008-06-27 Thread Jim Lucas
Boyd, Todd M. wrote: -Original Message- From: Chris Scott [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2008 8:48 AM To: php-general@lists.php.net Subject: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files Importance: Low I don't think you can open files for writing over http, yo

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Jim Lucas
d Information Science Indiana University Bloomington [EMAIL PROTECTED] From: Per Jessen [EMAIL PROTECTED] Sent: Friday, June 27, 2008 8:26 AM To: php-general@lists.php.net Subject: Re: [PHP] fwrite() Append Files Wei, Alice J. wrote: Hi, I wonder if anyone o

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Jim Lucas
University Bloomington [EMAIL PROTECTED] From: Per Jessen [EMAIL PROTECTED] Sent: Friday, June 27, 2008 8:26 AM To: php-general@lists.php.net Subject: Re: [PHP] fwrite() Append Files Wei, Alice J. wrote: Hi, I wonder if anyone on the list could tell me how to app

[PHP] FW: [SPAM] RE: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files

2008-06-27 Thread Chris Scott
>> -Original Message- >> From: Chris Scott [mailto:[EMAIL PROTECTED] >> Sent: Friday, June 27, 2008 8:48 AM >> To: php-general@lists.php.net >> Subject: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files >> Importance: Low >> >> I don'

RE: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files

2008-06-27 Thread Boyd, Todd M.
> -Original Message- > From: Chris Scott [mailto:[EMAIL PROTECTED] > Sent: Friday, June 27, 2008 8:48 AM > To: php-general@lists.php.net > Subject: [PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files > Importance: Low > > I don't think you can open files for

[PHP] FW: [SPAM] RE: [PHP] fwrite() Append Files

2008-06-27 Thread Chris Scott
bject: [SPAM] RE: [PHP] fwrite() Append Files Importance: Low Wei, Alice J. wrote: > > Do you mean to edit $ourFileHandle to fopen($ourFileName, 'wba')? > I think fopen($ourFileName, 'a') will do what you want. /Per Jessen, Zürich -- PHP General Mailing List (h

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Daniel Brown
On Fri, Jun 27, 2008 at 7:01 AM, Wei, Alice J. <[EMAIL PROTECTED]> wrote: > Hi, > > I wonder if anyone on the list could tell me how to append the files as I am > writing in them. I have a file that has no more than five characters per > line, and I would like to keep its spacing between the lin

RE: [PHP] fwrite() Append Files

2008-06-27 Thread Per Jessen
Wei, Alice J. wrote: > > Do you mean to edit $ourFileHandle to fopen($ourFileName, 'wba')? > I think fopen($ourFileName, 'a') will do what you want. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] fwrite() Append Files

2008-06-27 Thread Wei, Alice J.
EMAIL PROTECTED] ________ From: Per Jessen [EMAIL PROTECTED] Sent: Friday, June 27, 2008 8:26 AM To: php-general@lists.php.net Subject: Re: [PHP] fwrite() Append Files Wei, Alice J. wrote: > Hi, > > I wonder if anyone on the list could tell me how to app

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Per Jessen
Wei, Alice J. wrote: > Hi, > > I wonder if anyone on the list could tell me how to append the files > as I am writing in them. I have a file that has no more than five > characters per line, and I would like to keep its spacing between > the lines. Right now I have the set up so that it c

Re: [PHP] fwrite() Append Files

2008-06-27 Thread Wolf
Wei, Alice J. wrote: Hi, I wonder if anyone on the list could tell me how to append the files as I am writing in them. I have a file that has no more than five characters per line, and I would like to keep its spacing between the lines. Right now I have the set up so that it could write in

Re: FW: [PHP] fwrite() Append Files

2008-06-27 Thread Stijn Verholen
, I'm not clear on the problem. -Original Message- From: Wei, Alice J. [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2008 12:02 PM To: php-general@lists.php.net Subject: [PHP] fwrite() Append Files Hi, I wonder if anyone on the list could tell me how to append the files as I am wr

FW: [PHP] fwrite() Append Files

2008-06-27 Thread Chris Scott
Please post the code, I'm not clear on the problem. -Original Message- From: Wei, Alice J. [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2008 12:02 PM To: php-general@lists.php.net Subject: [PHP] fwrite() Append Files Hi, I wonder if anyone on the list could tell me how to a

[PHP] fwrite() Append Files

2008-06-27 Thread Wei, Alice J.
Hi, I wonder if anyone on the list could tell me how to append the files as I am writing in them. I have a file that has no more than five characters per line, and I would like to keep its spacing between the lines. Right now I have the set up so that it could write in the first line, but the

Re: [PHP] fwrite/fclose troubles

2008-03-19 Thread Stut
Please keep replies on-list so everyone can benefit from the discussion. On 20 Mar 2008, at 00:13, Mark Weaver wrote: Stut wrote: RTFM. The fopen function (http://php.net/fopen) will return a stream resource. The fwrite (http://php.net/fwrite) and fclose (http://php.net/fclose - noticing a p

Re: [PHP] fwrite/fclose troubles

2008-03-19 Thread Stut
On 19 Mar 2008, at 23:38, Mark Weaver wrote: I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only serv

[PHP] fwrite/fclose troubles

2008-03-19 Thread Mark Weaver
Hi all, I've been lurking and reading now for some time, but have decided to come out of the shadows cause I've got an issue that's gonna drive me crazy! I'm developing an application and within this application is a class that is very simple and only serves a singular purpose - to make log entr

Re: [PHP] Fwrite Function

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 6:03 am, Yuval Schwartz wrote: > Hello, > > Can you please help me, I am writing code where I create a file and > write to > it from a form on a webpage and then read and display this file on the > webpage. > I want to change the color of the text that is written to the

Re: [PHP] Fwrite Function

2008-02-16 Thread Nick Stinemates
Yuval Schwartz wrote: > Hello, > > Can you please help me, I am writing code where I create a file and write to > it from a form on a webpage and then read and display this file on the > webpage. > I want to change the color of the text that is written to the file. > Do you know how I can do this?

RE: [PHP] Fwrite Function

2008-02-16 Thread Bastien Koert
stien > Date: Sat, 16 Feb 2008 14:03:26 +0200 > From: [EMAIL PROTECTED] > To: php-general@lists.php.net > Subject: [PHP] Fwrite Function > > Hello, > > Can you please help me, I am writing code where I create a file and write to > it from a

[PHP] Fwrite Function

2008-02-16 Thread Yuval Schwartz
Hello, Can you please help me, I am writing code where I create a file and write to it from a form on a webpage and then read and display this file on the webpage. I want to change the color of the text that is written to the file. Do you know how I can do this? This is some of my code if you nee

[PHP] fwrite() timeout

2006-11-06 Thread Martin Cetkovsky
Hi, I am using the fsockopen(), fwrite() and fread() functions to get a web page from a remote server. The remote server is currently down and I see the code hangs on the fwrite() call. Is there a way how to set a timeout for the fwrite() remote call? I have found the stream_set_timeout()

[PHP] fwrite() timeout

2006-11-06 Thread Martin Cetkovsky
Hi, I am using the fsockopen(), fwrite() and fread() functions to get a web page from a remote server. The remote server is currently down and I see the code hangs on the fwrite() call. Is there a way how to set a timeout for the fwrite() remote call? I have found the stream_set_timeout(), b

RE: [PHP] fwrite fopen problem

2006-08-16 Thread Programmer
Fixed by re-assigning IUSR... to directory security. Cheers. -Original Message- From: Jeremy Schreckhise [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 10:59 AM To: php-general@lists.php.net Subject: [PHP] fwrite fopen problem System Windows XP: PHP 5 I have a folder

[PHP] fwrite fopen problem

2006-08-16 Thread Jeremy Schreckhise
System Windows XP: PHP 5 I have a folder in which I want to write files. The IUSR_... user has full control, yet I am still getting failed to open stream and permission dined errors. Any suggestions? I have done this same task on many XP machines and 2003 servers. I am totally stumpe

Re: [PHP] fwrite/fopen

2005-06-11 Thread Mister Jack
fwrite failed for "quota disc exceeded", so I end up with empty file. the algorithm is something like : if (! $fp = @fopen($config['pagecachedir'].$path.$tmp_value,'wb')) { $errorLog .= "Writing problem for ".$config['pagecachedir']. "$path$tmp_value!\n";

[PHP] fwrite/fopen

2005-06-10 Thread Mister Jack
Hi, I having a problem at the moment, I open a file, try to write in it, and then remove the file if the write goes wrong (if write count != of my initial buffer length). But I still get some empty file (and then a blank page). Could possibly fopen (with a 'wb' flag, and under freebsd 4.11) failed

Re: [PHP] fwrite and sort

2005-03-21 Thread Richard Lynch
http://php.net/asort On Mon, March 21, 2005 12:29 pm, Sebastian said: > i have a form with checkboxes which after POST it writes to a file. > i would like to allow the user to sort the selected checkbox filename in > the > order they want it written to file. > > so i was thinking creating an inp

[PHP] fwrite and sort

2005-03-21 Thread Sebastian
i have a form with checkboxes which after POST it writes to a file. i would like to allow the user to sort the selected checkbox filename in the order they want it written to file. so i was thinking creating an input text box where they can enter a number, then have it written to file in that orde

Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Jason Wong
On Thursday 18 November 2004 23:46, Dennis Lahay wrote: > Ah, if were only that simple but, alas, it is not. I have opened other > documents that contain these special characters and BBEdit has > displayed them properly. After creating the file, use PHP to read it back and display its contents. -

Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Marek Kilimajer
Dennis Lahay wrote: Ah, if were only that simple but, alas, it is not. I have opened other documents that contain these special characters and BBEdit has displayed them properly. Are you using the same charset for both? What is the original source of the data? html form? then they are in the cha

Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Dennis Lahay
Ah, if were only that simple but, alas, it is not. I have opened other documents that contain these special characters and BBEdit has displayed them properly. On Nov 18, 2004, at 8:23 AM, Marek Kilimajer wrote: You are not loosing them, only bbedit does not display them in the original charset

Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Dennis Lahay
The file doesn't exist, so I need to create it first. So I did this: $filename = "../../../Volumes/FILEJOB/" . $row['currentSVVersion']; if (!$file = fopen($filename, 'w+')) { print "Cannot open file ($filename)"; exit; } fclose($file); Then I wrote to it using your suggestion: if (!$file =

Re: [PHP] fwrite() seems to destroy Special Characters

2004-11-18 Thread Marek Kilimajer
Dennis Lahay wrote: I'm having trouble with writing special charcaters to a text file. The characters are your run-of-the-mill accented characters. Passing them back and forth in the database and displaying them on screen is NOT a problem. code snippet: $row = mysql_fetch_array($query_result, M

[PHP] fwrite() seems to destroy Special Characters

2004-11-17 Thread Dennis Lahay
I'm having trouble with writing special charcaters to a text file. The characters are your run-of-the-mill accented characters. Passing them back and forth in the database and displaying them on screen is NOT a problem. code snippet: $row = mysql_fetch_array($query_result, MYSQL_ASSOC); foreach

RE: [PHP] fwrite, fopen, or fread limit?

2003-11-05 Thread Wouter van Vliet
rs ) -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Tuesday 04 November 2003 18:55 To: Roger Spears Cc: [EMAIL PROTECTED] Subject: RE: [PHP] fwrite, fopen, or fread limit? Yes, that was it. Thanks! :) -Mike > -Original Message- > From: Roger Spear

RE: [PHP] fwrite, fopen, or fread limit?

2003-11-04 Thread Mike At Spy
Yes, that was it. Thanks! :) -Mike > -Original Message- > From: Roger Spears [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2003 12:45 PM > To: Mike At Spy > Subject: Re: [PHP] fwrite, fopen, or fread limit? > > > check the php.ini file, there ma

RE: [PHP] fwrite, fopen, or fread limit?

2003-11-04 Thread Jay Blanchard
[snip] Does anyone know if the commands for fwrite, fopen, or fread have memory limits in dealing with large files? I created a system for uploading files to a server. Small files work fine. Larger ones (around 7 megs) do not work at all. [/snip] Have you checked your upload_max_filesize in php.

[PHP] fwrite, fopen, or fread limit?

2003-11-04 Thread Mike At Spy
Does anyone know if the commands for fwrite, fopen, or fread have memory limits in dealing with large files? I created a system for uploading files to a server. Small files work fine. Larger ones (around 7 megs) do not work at all. Thanks, -Mike -- PHP General Mailing List (http://www.php.ne

Re: [PHP] fwrite int or float

2003-07-24 Thread Curt Zirzow
* Thus wrote Ted Huntington ([EMAIL PROTECTED]): > I basically solved this problem of writing a 32 bit float in little endian on > a big endian computer using: > $num2=pack("f",$num); > fwrite($fp,$num2[3],1); > fwrite($fp,$num2[2],1); > fwrite($fp,$num2[1],1); > fwrite($fp,$num2[0],1); > > for fl

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
I basically solved this problem of writing a 32 bit float in little endian on a big endian computer using: $num2=pack("f",$num); fwrite($fp,$num2[3],1); fwrite($fp,$num2[2],1); fwrite($fp,$num2[1],1); fwrite($fp,$num2[0],1); for floating point (I am working on a UNIX [big endian] making a file for

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
I should have type "signed 32 bit little endian" and little endian float. Ted Huntington wrote: > ok I see to use the "pack" command, but now how do I format to 32 bit > little endian? > > Ted Huntington wrote: > > > Is there some easy way to fwrite a 32 bit int or float? > > > > -- > > Ted Hunti

Re: [PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
ok I see to use the "pack" command, but now how do I format to 32 bit little endian? Ted Huntington wrote: > Is there some easy way to fwrite a 32 bit int or float? > > -- > Ted Huntington > Programmer Analyst I > Main Library > University of California, Irvine > PO Box 19557 > Irvine, CA 92623-

[PHP] fwrite int or float

2003-07-24 Thread Ted Huntington
Is there some easy way to fwrite a 32 bit int or float? -- Ted Huntington Programmer Analyst I Main Library University of California, Irvine PO Box 19557 Irvine, CA 92623-9557 Phone Bus Off 949 824 8926 Phone MRC 949 824 1674 emesg: [EMAIL PROTECTED] webpage: http://business.lib.uci.edu/webp

Re: [PHP] fwrite not working in php3

2003-07-16 Thread daniel
sorry guys the server was full again , doesnt return any error at all funny hey > On Thursday 17 July 2003 09:46, [EMAIL PROTECTED] wrote: >> hi there i have a little problem writing files on a php3 server this >> code worked yesterday but isnt >> >> $handle = >> fopen("/www_tools/apache/htdocs/ph

Re: [PHP] fwrite not working in php3

2003-07-16 Thread Curt Zirzow
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > hi there i have a little problem writing files on a php3 server this code > worked yesterday but isnt > > $handle = fopen("/www_tools/apache/htdocs/phptest/temp_real/test.inc",'a'); Test your $handle to see if you successfully opened the file. if (!

Re: [PHP] fwrite not working in php3

2003-07-16 Thread Jason Wong
On Thursday 17 July 2003 09:46, [EMAIL PROTECTED] wrote: > hi there i have a little problem writing files on a php3 server this code > worked yesterday but isnt > > $handle = fopen("/www_tools/apache/htdocs/phptest/temp_real/test.inc",'a'); > $buffer = "test"; > echo fwrite($handle,$buffer,4000); >

[PHP] fwrite not working in php3

2003-07-16 Thread daniel
hi there i have a little problem writing files on a php3 server this code worked yesterday but isnt $handle = fopen("/www_tools/apache/htdocs/phptest/temp_real/test.inc",'a'); $buffer = "test"; echo fwrite($handle,$buffer,4000); fclose($handle); i get a filesize of 0 and nothing writes to it what

Re: [PHP] fwrite() question

2003-07-01 Thread Jason Wong
On Tuesday 01 July 2003 22:12, Adam Williams wrote: > when I do that, nothing is written to news.txt, and I'm not sure why. Well find out why! > This is the entire script: > > if ($_POST['news']) > { > $fp = fopen( "news.txt", "w"); Add some error-checking to see whether fopen() was su

Re: [PHP] fwrite() question

2003-07-01 Thread Adam Williams
Hi, when I do that, nothing is written to news.txt, and I'm not sure why. This is the entire script: unable to write to news.txt"; exit; } Header("Location: http://archives1.mdah.state.ms.us/news.php"; ); } ?> News update Please make your changes below and then click

Re: [PHP] fwrite() question

2003-07-01 Thread Adrian
you should use $_POST['news'] instead of "$POST_['news']". ans you also should'nt put " around variables ;) > Hello, > I have a block of code: > if ($_POST['news']) > { > $fp = fopen( "news.txt", "w"); > $success = fwrite( $fp, "$POST_['news']" ); >

[PHP] fwrite() question

2003-07-01 Thread Adam Williams
Hello, I have a block of code: unable to write to news.txt"; exit; } Header("Location: http://archives1.mdah.state.ms.us/news.php"; ); } ?> and when I access it, I get the error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/l

Re: [PHP] fwrite() debugging

2002-12-31 Thread Michael J. Pawlowsky
Try *** REPLY SEPARATOR *** On 31/12/2002 at 5:27 PM Alberto Brea wrote: >Could somebody please tell me what I'm doing wrong here? > >The code is: >$fd=fopen($filename, "a"); >fwrite($filename, "xyz"); >fclose($fd); ?> > >And I get the following error message: >"Warning: f

Re: [PHP] fwrite() debugging

2002-12-31 Thread Timothy Hitchens \(HiTCHO\)
D]> Sent: Wednesday, January 01, 2003 6:27 AM Subject: [PHP] fwrite() debugging Could somebody please tell me what I'm doing wrong here? The code is: And I get the following error message: "Warning: fwrite(): supplied argument is not a valid File-Handle resource in c:\archivos de pro

[PHP] fwrite() debugging

2002-12-31 Thread Alberto Brea
Could somebody please tell me what I'm doing wrong here? The code is: And I get the following error message: "Warning: fwrite(): supplied argument is not a valid File-Handle resource in c:\archivos de programa\apache group\apache\htdocs\visitrep\report_options.inc on line 111" Thanks a lot in

Re: [PHP] fwrite() blank-line Quirk?

2002-12-22 Thread Jason Wong
On Sunday 22 December 2002 13:52, Noel Wade wrote: > Hi All, > > Relatively new PHP coder (was in an MS / ASP shop before)... I'm doing > some flat-file manipulation (please, spare me the database comments, I'm > working on it!), and I'm having to read strings out of one file and copy > them into

[PHP] fwrite() blank-line Quirk?

2002-12-21 Thread Noel Wade
Hi All, Relatively new PHP coder (was in an MS / ASP shop before)... I'm doing some flat-file manipulation (please, spare me the database comments, I'm working on it!), and I'm having to read strings out of one file and copy them into another until a while() condition is satisfied. The problem i

[PHP] fwrite and line breaks

2002-12-12 Thread Jami
I know that fwrite needs to be written as such: $Open=fopen($MyFile, "w"); fwrite($Open, "Text to add to file.\n"); The file is being saved on a Unix server, but Windows/Mac users will be downloading the file. How can I create line breaks that notepad/textpad will use to create new lines, inste

Re: [PHP] fwrite()ing predefined variables

2002-12-10 Thread Alberto Brea
All these variables show on the browser quite well from a regular .php file, so they are still pre-defined, but I can't fprint() them to a text file.

Re: [PHP] fwrite()ing predefined variables

2002-12-10 Thread Jason Wong
On Wednesday 11 December 2002 03:00, Alberto Brea wrote: > Hi, > Could somebody please tell me why I can't print pre-defined variables to a > file with fwrite()? > > The code I use is this: > $filename = '../vlog.txt'; > $fd= fopen($filename, 'a'); > $a= date(YmdHi); > $b= basename($PHP_SELF)

[PHP] fwrite()ing predefined variables

2002-12-10 Thread Alberto Brea
Hi, Could somebody please tell me why I can't print pre-defined variables to a file with fwrite()? The code I use is this: $filename = '../vlog.txt'; $fd= fopen($filename, 'a'); $a= date(YmdHi); $b= basename($PHP_SELF); $c= $HTTP_USER_AGENT; $d= $HTTP_HOST; $e= $_SERVER['HTTP_HOST'];

Re: [PHP] fwrite

2002-04-10 Thread Ninety-Nine Ways To Die
$fp = fwrite($myfile,chr(13)); -- On Wed, 10 Apr 2002 16:44:44 Ron Allen wrote: >Using fwrite how would I insert a line return > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > See Dave Matthews Band live or win a signed gui

Re: [PHP] fwrite

2002-04-10 Thread Jason Wong
On Wednesday 10 April 2002 22:44, Ron Allen wrote: > Using fwrite how would I insert a line return \r ==> return \n ==> linefeed -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Develo

[PHP] fwrite

2002-04-10 Thread Ron Allen
Using fwrite how would I insert a line return -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fwrite() - problems....

2002-04-08 Thread Miguel Cruz
On Mon, 8 Apr 2002, Phil Schwarzmann wrote: > $filename = "hello.txt"; > $outputstring = "hello"; > > fwrite($filename, $outputstring); http://php.net/fwrite miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fwrite() - problems....

2002-04-08 Thread R'twick Niceorgaw
you are missing fopen() before calling fwrite() - Original Message - From: "Phil Schwarzmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 08, 2002 1:50 PM Subject: [PHP] fwrite() - problems > I have a large string that I want

RE: [PHP] fwrite() - problems....

2002-04-08 Thread Rick Emery
$fp = fopen($filename, "w"); fwrite($fp, $outputstring); READ THE DOCS -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 12:51 PM To: [EMAIL PROTECTED] Subject: [PHP] fwrite() - problems I have a large string that I want

[PHP] fwrite() - problems....

2002-04-08 Thread Phil Schwarzmann
I have a large string that I want to written to a new file. Let's say the string contains the characters, "hello!" and I want the filename to be "hello.txt" Here is the code I have... $filename = "hello.txt"; $outputstring = "hello"; fwrite($filename, $outputstring); ...and of course it

Re: [PHP] fwrite????

2001-08-20 Thread Brian C. Doyle
; place the file pointer at the end > of the file. If the file does not exist, attempt to create it. >..." > >info from >http://www.php.net/manual/en/function.fopen.php > >- Original Message ----- >From: Brian C. Doyle <[EMAIL PROTECTED]> >To: <[EMAIL PRO

Re: [PHP] fwrite????

2001-08-20 Thread Anton Stroganov
From: Brian C. Doyle <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 20, 2001 11:06 Subject: [PHP] fwrite > Hello all, > > Is is possible to just append to the end of a file using > fwrite??? Currently I am reading the contents for the file into an array

[PHP] fwrite????

2001-08-20 Thread Brian C. Doyle
Hello all, Is is possible to just append to the end of a file using fwrite??? Currently I am reading the contents for the file into an array then add to the array what I want and rewrite the file from the array... And well that is just silly... How else would I do this?? -- PHP General Ma

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-17 Thread Chris Anderson
I am using the latest version of Apache and PHP. Sorry I couldn't be of more help. - Original Message - From: "CC Zona" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 17, 2001 3:01 AM Subject: Re: [PHP] fwrite not writing (simpler example),

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
In article <012101c0c69b$b01b8d00$8b1412d1@null>, [EMAIL PROTECTED] ("Chris Anderson") wrote: > I tried it, even with the byte length identifer it worked perfectly for me. > As a last ditch effort try changing the w to w+. If not then it sounds like > a configuration issue for the webserver or p

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread Chris Anderson
From: "CC Zona" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 16, 2001 10:48 PM Subject: Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14 > In article <006701c0c699$ad65cdc0$8b1412d1@null>, > [EMAIL PROTECTED] ("Ch

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
In article <006701c0c699$ad65cdc0$8b1412d1@null>, [EMAIL PROTECTED] ("Chris Anderson") wrote: > come to think of it, why are you passing 3 arguements to fwrite()? Whoops! That's a typo left over from the last round of tests, adding every optional argument just in case something wasn't really

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread Chris Anderson
alright try removing the byte length identifier - Original Message - From: "Chris Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, April 16, 2001 1:20 PM Subject: Re: [PHP] fwrite not writing (simpler example), PHP 4.0.

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread Chris Anderson
come to think of it, why are you passing 3 arguements to fwrite()? - Original Message - From: "CC Zona" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 16, 2001 5:34 PM Subject: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
ty string on the next pass). No to those too. > - Original Message - > From: "CC Zona" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, April 16, 2001 5:34 PM > Subject: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, > Apache/1.3.14

Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread Chris Anderson
CTED]> Sent: Monday, April 16, 2001 5:34 PM Subject: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14 > Suggestions so far have focused on parts of the function other than fwrite, > so I'm trying again with a stripped-down example. After spending many > h

[PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

2001-04-16 Thread CC Zona
Suggestions so far have focused on parts of the function other than fwrite, so I'm trying again with a stripped-down example. After spending many hours trying to make this very simple function work again, I'm beginning to think fwrite in broken--either in 4.0.4pl1 (?!) or in my build of it (it

Re: [PHP] fwrite not writing

2001-04-16 Thread Szii
om: CC Zona <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 16, 2001 12:06 PM Subject: Re: [PHP] fwrite not writing > In article <9bejks$gl6$[EMAIL PROTECTED]>, > [EMAIL PROTECTED] ("Plutarck") wrote: > > > I'm not sure why it suddenly

Re: [PHP] fwrite not writing

2001-04-16 Thread CC Zona
In article <9bejks$gl6$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Plutarck") wrote: > I'm not sure why it suddenly stopped working, but let's see if you actually > need it to work. > > First of all, I take it that you have content which you want to write into a > file. Correct? > > If so, why doe

Re: [PHP] fwrite not writing

2001-04-16 Thread Plutarck
Ahhh, I see what's going on now. I had more time to read over the code, so now I see what you are trying to do. I'm not sure why it suddenly stopped working, but let's see if you actually need it to work. First of all, I take it that you have content which you want to write into a file. Correct?

Re: [PHP] fwrite not writing

2001-04-16 Thread CC Zona
> > This function suddenly stopped working, and I just can't seem to figure > out > > why. The only change made recently is that now the value of $force at > > calltime is sometimes true instead of being undefined or null. > > > > build_file("file_content","/path/to/file.inc","w",TRUE); > > > > f

Re: [PHP] fwrite not writing

2001-04-15 Thread Plutarck
What is this: !filesize($filepath) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; That might be causing your loop not to execute...if not, I'm not sure what's wrong. -- Plutarck Should be working on something... ...but forgot what it was. "CC Zona" <[EMAIL P

[PHP] fwrite not writing

2001-04-15 Thread CC Zona
This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func

Re: [PHP] fwrite()

2001-04-06 Thread Adam
simply add: $conteudo = stripslashes($conteudo) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] fwrite()

2001-04-06 Thread Richard
Check out .htmlspecialchars(..) .removeslashes() .stripslashes() - Richard "Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote in message Pine.GSO.4.10.10104062012140.20277-10@venus">news:Pine.GSO.4.10.10104062012140.20277-10@venus... > I have a textarea and I want to save t

[PHP] fwrite()

2001-04-06 Thread Augusto Cesar Castoldi
I have a textarea and I want to save the textarea text into a file. Then I put this in the html: And this in action of php: $fd = fopen("Augusto.wri", "w" ); fwrite($fd, $conteudo); fclose( $fd ); But I'm having a big problem on this. Is the text has this caracter ("), the PHP add "\" before.

[PHP] fwrite in PHP4

2001-02-27 Thread Otakar Nejezchleb
This script works properly under PHP 3.0.18, but in PHP 4.0.4pl1 is the result file empty. When I add commented line #2 instead of calling MyEcho, it works correctly. When I add lines #1, it works somehow strange. After fwrite and fclose is file empty and after second fopen (and no fwrite) "OK" ap