RE: [PHP] location of the PHP executable
- From: ljbuesch@xxxxxxxxxx ("Buesching, Logan J")
- Date: Wed, 11 Apr 2007 18:38:49 -0400
IF db not exists THEN
locate -u
END-IF
I'd hate to see the time it'd take to create a first-time database...
this could take awhile to run.
-----Original Message-----
From: Davi [mailto:davividal@xxxxxxxxxxxxxxxx]
Sent: Wednesday, April 11, 2007 6:10 PM
To: php-general@xxxxxxxxxxxxx
Subject: Re: [PHP] location of the PHP executable
Em Quarta 11 Abril 2007 18:50, Jarrel Cobb escreveu:
Don't you have to run locate -u first to generate the database beforeusing
locate? You can't just assume a database exists already can you?
If you can use locate, you can use which... =P
BTW, do something to check OS then:
IF OS == *nix THEN
IF exists /usr/bin/which THEN
which php
ELSE
IF exists /usr/bin/locate THEN
locate php | grep -iE "php$"
ELSE
IF exists /usr/bin/find THEN
find / -name php | grep -iE "php$"
ELSE
cd / && ls php -Rv
END-IF
END-IF
END-IF
ELSE
cd \
dir php*.exe /s
END-IF
Check if I don't miss any END-IF... =P
[]s
--
Davi Vidal
davividal@xxxxxxxxxxxxxxxx
davividal@xxxxxxxxx
--
Agora com fortune:
"rugged, adj.:
Too heavy to lift."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
- Follow-Ups:
- Re: [PHP] location of the PHP executable
- From: Davi
- Re: [PHP] location of the PHP executable
- References:
- Re: [PHP] location of the PHP executable
- From: Davi
- Re: [PHP] location of the PHP executable
- Prev by Date: Re: [PHP] location of the PHP executable
- Next by Date: High res image manipulation through php
- Previous by thread: Re: [PHP] location of the PHP executable
- Next by thread: Re: [PHP] location of the PHP executable
- Index(es):
Relevant Pages
|
|