php-windows | 2003032
Date: 03/22/03
- Next message: Bobo Wieland: "[PHP-WIN] crop images"
- Previous message: fbn: "[PHP-WIN] ImageCreateFromJpeg problem loop in apache under win"
- In reply to: John M. Calvert: "[PHP-WIN] determine host platform - win32 / *nix"
- Next in thread: John M. Calvert: "Re: [PHP-WIN] determine host platform - win32 / *nix"
- Reply: John M. Calvert: "Re: [PHP-WIN] determine host platform - win32 / *nix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
There's a few examples of this in the manual somewhere... but here's
some basic code for it:
if (strtoupper(substr(PHP_OS, 0,3) == 'WIN'))
dl('module.dll');
else
dl('module.so');
Hope that helps.
~ Eric Gach
EvilWalrus.com Co-Administrator
-----Original Message-----
From: John M. Calvert [mailto:vbhackattack <email protected>]
Sent: Saturday, March 22, 2003 8:03 AM
To: php-windows <email protected>
Subject: [PHP-WIN] determine host platform - win32 / *nix
Hello, how do I determine from code the host platform running PHP? For
example, php.dl() requires a different module name under Win32 and *nix
so
for more portable code I would like to write something like:
if (php_platform() == WIN32)
dl('module.dll');
else
dl('module.so');
Does this exist?
John M. Calvert, M.Sc., MCSD
1310521 Ontario Inc.
49 Belmont Ave.
Ottawa ON K1S 0V2
(613) 730-9851
http://members.rogers.com/john-m-calvert/
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.461 / Virus Database: 260 - Release Date: 3/10/2003
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.461 / Virus Database: 260 - Release Date: 3/10/2003
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Bobo Wieland: "[PHP-WIN] crop images"
- Previous message: fbn: "[PHP-WIN] ImageCreateFromJpeg problem loop in apache under win"
- In reply to: John M. Calvert: "[PHP-WIN] determine host platform - win32 / *nix"
- Next in thread: John M. Calvert: "Re: [PHP-WIN] determine host platform - win32 / *nix"
- Reply: John M. Calvert: "Re: [PHP-WIN] determine host platform - win32 / *nix"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

