[Wolves] Echoing first and last line of large file in PHP

Adam Sweet drinky76 at yahoo.com
Tue Mar 29 17:56:54 BST 2005


--- Alan Pope <alan.pope at gmail.com> wrote:
> On Fri, 25 Mar 2005 19:10:19 +0000 (GMT), Adam Sweet
> <drinky76 at yahoo.com> wrote:
> > Is there a quick way of doing this like the Unix
> head
> > and tail commands?
> 
> Why not *use* the head and tail commands?

Done it, thanks Aq and Alan. I thought there might be
a PHP function that just did this, rather than having
to learn how to shell out from a php web page.

As it happens it was pretty simple:

http://uk.php.net/shell_exec

Thanks for pointing out the obvious, I didn't know
that it was that simple. I'm still in my second week
of using PHP (Jono taught me the basics back in Jan).

Ad

-- 

http://www.drinky.org.uk

http://blog.drinky.org.uk

Send instant messages to your online friends http://uk.messenger.yahoo.com 



More information about the Wolves mailing list