Website Scripts And Cloud Tutorials

Find out which mode php is running CGI or DSO mode

Byadmin

Sep 18, 2010 ,
Click to rate this tutorial!
[Total: 4 Average: 4.5]

This script helps you to find out the mode in which your php scripts are running

< ?php
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "You are using CGI PHP\n";
} else {
echo "You are not using CGI PHP\n";
}
?>

The PHP constant PHP_SAPI has the same value as php_sapi_name().

Click to rate this tutorial!
[Total: 4 Average: 4.5]

Leave a Reply

Your email address will not be published.