Windows Vs. Linux Path
| From: | Florian Clever | Date: | Fri, 27 Oct 2000 07:31:50 +0000 |
| Subject: | Windows Vs. Linux Path | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3550@lists.php.net to get a copy of this message | ||
>I have a script. That needs to be able to exec() a program But the problem is that this
>program is in a sub directory. I am having a major problem figuring out how to detect if the
>script is running on win32 php or linux php if its running win32 the path needs to be like
>c:\whatever\what vs Linux /local/usr/bin/whatever.
Did you ever try:
c:/whatever/what
That should work on Windows.
>Anyone have an easy way to detect the Os a script is running from short of setting a varable in
>one of the include files for the user to set $os="win" vs $os="linux". I
>need a way of knowing
>if i should be doing a \ or a / in the path.
you could use HTTP_SERVER_VARS["OS"].
--
Florian Clever
fc@clever-soft.com
http://www.Clever-Software-Solutions.de/
PGP Key @ ldap://certserver.pgp.net/
"Always listen to experts. They'll tell you what can't be done, and why.
Then do it. " -- Robert A. Heinlein