On Tue, 01 Jul 2003 10:59:53 -0500, Kyle Babich wrote:
>How would I set the file pointer to the very end of the last line of the
>file?
Assuming you are trying to append to the file you can do the following
(open output append):
$fHandle = fopen( "file.txt", "a" );
or you can fopen the file i
$data = file('c:\blah.txt');
$lineyouwant = $data[(count($data)-1)];
Not necessarily most efficient, but it works.
> At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote:
> >How would I set the file pointer to the very end of the last line of the
> >file?
> >
> >ex. ahkjhff
> >asdjfhlkajf
> >sdfhakslj
$data = file('c:\blah.txt');
$lineyouwant = $data[(count($data)-1)];
Not necessarily most efficient, but it works.
> At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote:
> >How would I set the file pointer to the very end of the last line of the
> >file?
> >
> >ex. ahkjhff
> >asdjfhlkajf
> >sdfhakslj
Start by checking the file functions in the manual - there are some
interesting options for foen().
Miles
At 10:59 AM 7/1/2003 -0500, Kyle Babich wrote:
How would I set the file pointer to the very end of the last line of the
file?
ex. ahkjhff
asdjfhlkajf
sdfhaksljdh
kasjdhkjlfh
asdjfhklajs
askjdh
How would I set the file pointer to the very end of the last line of the
file?
ex. ahkjhff
asdjfhlkajf
sdfhaksljdh
kasjdhkjlfh
asdjfhklajs
askjdhjfdjf//here
Thanks,
--
Kyle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
5 matches
Mail list logo