Re: whoami explanation

From: Date: Tue, 03 Mar 2009 16:03:45 +0000
Subject: Re: whoami explanation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-289138@lists.php.net to get a copy of this message
Per Jessen wrote: > PJ wrote: > > >> This really needs some explanation >> I found this on the web: >> <?php echo whoami; ?> >> with it there was the comment "the direction of those single-quotes >> matters" (WHY ?) and it works.... >> >> > > GIYF - look up "back quotes". > > >> But this (_*FROM THE PHP MANUAL***_ * - exec()* executes the given >> /command/ ) does not, >> COPIED AND PASTED: >> |<?php >> // outputs the username that owns the running php/httpd process >> // (on a system with the "whoami" executable in the path) >> echo exec('whoami'); >> ?> | >> What is going on here? >> > > What sort of error did you get? (it works fine here). > > > /Per > > ok, ok, I found it but you guys are assuming that this is something everybody should know... hell, I've been tinkering with programming and unix etc. for many, many years and this is the first time I ran into back quotes. SORRY! -- Phil Jourdan --- pj@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com

« previous php.general (#289138) next »