Re: use linux commands within php

From: Date: Fri, 25 Jan 2002 20:53:04 +0000
Subject: Re: use linux commands within php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82157@lists.php.net to get a copy of this message
try this.... <? system ("/usr/bin/wc -l $userfile> 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 <tanknank@yahoo.com> wrote: > 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://auctions.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- +-----------------------------------------------+ | Pablo Dall'Oglio _ | | Univates - IT Department °v° | | Linux User n. 223253 /(_)\ | | The best source is the source code ^ ^ | +-----------------------------------------------+

« previous php.general (#82157) next »