RE: Newbie Questions
| From: | Ted Knudson | Date: | Fri, 16 Jun 2000 07:16:08 +0000 |
| Subject: | RE: Newbie Questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2052@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Martin Fernandez [mailto:martin@frescodesigns.com]
> Sent: Thursday, June 15, 2000 5:28 PM
> To: php-general@lists.php.net
> Subject: Newbie Questions
>
>
> Hello,
>
> I'm brand new to PHP and this list, so please forgive me if my questions
> have been covered.
>
> 1. How do I write to a specific location in a file? All the fopen()
> modes that I'm aware of either write at the beginning or end of the file
> (or simply write over the file) I want to put data in the middle of my
> file.
The only way to write to the middle of a file is to load the file, then
rewrite the file the way you want it. If it is a delimited file it is easy.
IF it is a text file you will have to figure out how to parse the
information then place the new data were you want it.
We would need more information before we can help you.
>
> 2. Can I pass a PHP variable on an anchor tag to another php document?
Yes you can. This has been discussed on this list several times. Look in
archives.
The best thing about PHP is that you do not have to send data to an other
page. It is better to use include().
If(something){include(newinfo.php;}
Ted Knudson
http://www.automatedcabinets.com
http://www.pulsarusa.com
It is better to teach someone to phpish.