RE: [PHP] Exec()ing two strings, using same shell?

From: Date: Mon, 11 Nov 2002 19:44:32 +0000
Subject: RE: [PHP] Exec()ing two strings, using same shell?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123876@lists.php.net to get a copy of this message
Exec("dir c:\somedir") or exec("cd somedir && dir") i.e. $dirContent = <one of the above>; print($dirContent); -----Original Message----- From: Leif K-Brooks [mailto:eurleif@buyer-brokerage.com] Sent: Monday, November 11, 2002 11:39 AM To: php-general@lists.php.net Subject: [PHP] Exec()ing two strings, using same shell? Sorry if I'm using the wrong words - not sure of the exact terminology. Anyway, is there a way to exec() two statments in the same shell? Example: //On win32 test machine exec("cd somedir"); print dir; //Outputs directory listing for c:\, not c:\somedir //But is there a way to get the directory listing for somedir instead? // I know I could do dir c:\someidr, but I'm doing more complex stuff than this example. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002

« previous php.general (#123876) next »