Re: [PHP] use linux commands within php

2002-01-25 Thread daniel
> try this > > > system ("/usr/bin/wc -l $userfile> t.txt"); > > $fd =fopen('t.txt', 'r'); > $buffer=fgets($fd,8); > > echo ($buffer); > fclose($fd); > > ?> Or... if you really just want to count the number of lines in a file... do this: This offers the advantage of having the fi

Re: [PHP] use linux commands within php

2002-01-25 Thread Pablo DallOglio
try this t.txt"); $fd =fopen('t.txt', 'r'); $buffer=fgets($fd,8); echo ($buffer); fclose($fd); ?> On Fri, 25 Jan 2002 11:41:44 -0800 (PST) toni baker <[EMAIL PROTECTED]> wrote: > How can I count the number of lines in the uploaded > file. ($userfile) > > What's wrong with the comm

[PHP] use linux commands within php

2002-01-25 Thread toni baker
How can I count the number of lines in the uploaded file. ($userfile) What's wrong with the command below. Thanks $fp = popen ("usr/bin/wc -l $userfile", "r"); __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auction