note 44375 deleted from function.php-sapi-name by aidan

From: Date: Wed, 04 Aug 2004 08:33:56 +0000
Subject: note 44375 deleted from function.php-sapi-name by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73904@lists.php.net to get a copy of this message
Note Submitter: fontajos@phpeppershop.com ---- Usually you want to determie if PHP runs as a server module or as a CGI program. Sometimes CGI implementations don't simply return 'cgi' but some more detailed strings like e.g. 'cgi-fcgi', so you need a more sophisticated check. The following would do: <?php $sapi_result = php_sapi_name(); if (substr($sapi_result,0,3) == 'cgi') { $sapi_result = 'cgi'; } ?>

« previous php.notes (#73904) next »