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
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
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
@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
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
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
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
>> -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'
> -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
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
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
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
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
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
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
, 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
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
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
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
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
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
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
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?
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
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
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()
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
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
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
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";
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
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
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
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.
-
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
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
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 =
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
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
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
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
[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.
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
* 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
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
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
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-
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
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
[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 (!
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);
>
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
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
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
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']" );
>
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
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
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
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
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
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
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
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.
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)
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'];
$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
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
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
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
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
$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
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
; 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
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
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
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),
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
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
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
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.
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
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
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
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
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
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
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?
> > 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
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
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
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]
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
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.
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
94 matches
Mail list logo