php-general | 2001032
Date: 03/22/01
- Next message: Jeff Armstrong: "RE: [PHP] files with html extension"
- Previous message: Stewart Taylor: "RE: [PHP] multiple selection dropdown lists"
- In reply to: Stewart Taylor: "RE: [PHP] please help with this simple problem"
- Next in thread: rui <email protected>: "Re: [PHP] please help with this simple problem"
- Reply: rui <email protected>: "Re: [PHP] please help with this simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
i tryed it and it ended up having an error that was caused originally by a
lack of a $ on the 3rd line variable... after i fixed that it said wrong
perameter count for fopen() on the third line, and "Warning: Supplied
argument is not a valid File-Handle resource" for the remaining lines below
that in that block of code.
i'm sorry, i'm kinda new to this : (
"Stewart Taylor" <Stewart.Taylor <email protected>> wrote in message
news:C1E948D3E464D2118B3E00A0C977F522019222EC <email protected>
> You need to copy the contents of the current file.
> Then recreate the file by writing the new message then writing back the
> original contents.
>
> e.g.
> $fname = basename($PHP_SELF). ".comment";
> $fsize = filesize($fname);
> fp = fopen(basename($fname));
> $data = fread($fp,fsize);
> fwrite($fp,$message);
> fwrite($fp,$data);
> fclose($fp);
>
> -Stewart
>
> -----Original Message-----
> From: adam [mailto:adam <email protected>]
> Sent: 22 March 2001 11:17
> To: php-general <email protected>
> Subject: [PHP] please help with this simple problem
>
>
> i am coding a simple script to post a text area into a file. it works, but
> it posts it at the bottom and i wanted to have it post to the top of the
> text already there..
>
> here's a snip of the important part of the script:
>
> $fp = fopen (basename($PHP_SELF) . ".comment", "a");
> fwrite ($fp, $message);
> fclose ($fp);
> }
>
> any help would be much appreciated
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Armstrong: "RE: [PHP] files with html extension"
- Previous message: Stewart Taylor: "RE: [PHP] multiple selection dropdown lists"
- In reply to: Stewart Taylor: "RE: [PHP] please help with this simple problem"
- Next in thread: rui <email protected>: "Re: [PHP] please help with this simple problem"
- Reply: rui <email protected>: "Re: [PHP] please help with this simple problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

