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:[EMAIL PROTECTED] Sent: Saturday, March 22, 2003 8:03 AM To: [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