Re: why doesn´t exec("dir"); work ?
| From: | FPU dot WHITES1 at FRIENDSPROVIDENT dot CO dot UK | Date: | Fri, 16 Nov 2001 09:29:06 +0000 |
| Subject: | Re: why doesn´t exec("dir"); work ? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-10447@lists.php.net to get a copy of this message | ||
--- Received from FPU.WHITES1 799 3703 16-11-01 09:26
-> IN=php-windows@lists.php.net
If you're doing directory and file manipulation through the shell I'd
recommend you bin the shell altogether and use the directory and file
functions - much more reliable and shell independent.
http://www.php.net/manual/en/ref.dir.php
http://www.php.net/manual/en/ref.filesystem.php
-Steve
--------------------------------------------------------------------------
From: huangyuzhen@bj.tom.com
To: php-windows@lists.php.net, danhel-9@student.luth.se
Date: Fri, 16 Nov 2001 09:43:10 +0800
Subject: Re: [PHP-WIN] why doesn´t exec("dir"); work ?
i think you could try "cmd /c dir"
----- Original Message -----
From: "Daniel Hellstrand" <danhel-9@student.luth.se>
To: <php-windows@lists.php.net>
Sent: Friday, November 16, 2001 3:42 AM
Subject: Re: [PHP-WIN] why doesn´t exec("dir"); work ?
> Shouldn´t it be: foreach( $dirContents as $dirEntry ) ?
> And another problem: I still get an error saying: "unable to fork [dir]"
> when I run this (I got that when I ran exec("dir") too)
> /Dan
> Chris Boget wrote:
> > > why can´t I run exec("dir"); ?
> >
> > What you want is:
> >
> > exec( "dir", $dirContents );
> > foreach( $dirEntry as $dirContents ) {
> > echo $dirEntry;
> >
> > }
> >
> > I believe that'll work and do what you want...
> >
> > Chris
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
This e-mail may contain confidential information and/or copyright
material. This e-mail is intended for the use of the addressee
only. Any unauthorised use may be unlawful.
If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.
Friends Provident Marketing Group consists of the following
companies:
Friends Provident Life and Pensions Limited.
Registered number 4096141.
Friends' Provident Unit Trust Managers Limited.
Registered number 970641
FP Life Assurance Limited.
Registered number 782698
Friends Provident Pensions Limited.
Registered number 475201
Friends Ivory & Sime Managed Pensions Funds Limited.
Registered number 1020044
Registered and Head Office of each of the above companies is at Pixham End,
Dorking, Surrey RH4 1QA.
Registered in England. Incorporated companies limited by shares.
Ivory & Sime Trustlink Limited. Registered number 151198
Registered and Head Office: One Charlotte Square, Edinburgh EH2
4DZ. Registered in Scotland. Incorporated company limited by
shares.
Companies within this Group transact life assurance, pension,
permanent health, unit trust and investment trust business
All are regulated by the Personal Investment Authority.
Friends' Provident Unit Trust Managers Limited is also regulated
by IMRO.