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
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
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?
Its a text file and so doesn't support markup. You could write out html into
the file that does mark it up and could be displayed to the user via the
browser...or you could use regex or str_replace to mark up certain text on the
read of the file to display to the user
bastien
-
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 i
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";
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
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
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.
* 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-
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);
>
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']" );
>
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
The $fd is the file handler now not the $filename.
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]
HiTCHO | Open Platform Web Development
Consutling - Outsourcing - Training - Support
- Original Message -
From: "Alberto Brea" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, Ja
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
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)
$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
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 to written to a new file.
>
> Let's
$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 to written t
Thank you for your time
I did not even look at the fopen... DUH
Sorry about not researching properly...
At 11:14 AM 8/20/01 -0700, Anton Stroganov wrote:
>when you open the file with fopen(), use the 'a' (writing only) or 'a+'
>(reading and writing) arguments
>ie:
>int fopen ("somefile.txt"
when you open the file with fopen(), use the 'a' (writing only) or 'a+'
(reading and writing) arguments
ie:
int fopen ("somefile.txt", "a");
"...
*'a' - Open for writing only; place the file pointer at the end of the
file.
If the file does not exist, attempt to create it.
*'a+' - Op
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
> Suggestions so far h
In article <002b01c0c697$9628ee00$8b1412d1@null>,
[EMAIL PROTECTED] ("Chris Anderson") wrote:
> Have you checked the following things:
> A) if the file is actually there?
Yes. (And even when the file is not there, fopen() correctly re-creates
it. And fwrite continued to write the wrong--emp
Have you checked the following things:
A) if the file is actually there?
B)Is it an include error
C)Do you have the required permissions for write access and for including
from that directory?
- Original Message -
From: "CC Zona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, Ap
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
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
67 matches
Mail list logo