Options PHP et informations
assert assert-options extension_loaded dl getenv get_cfg_var get_current_user get_defined_constants get_extension_funcs getmygid get_included_files get_loaded_extensions get_required_files get_magic_quotes_gpc get_magic_quotes_runtime getlastmod getmyinode getmypid getmyuid getrusage ini_alter ini_get ini_get_all ini_restore ini_set phpcredits phpinfo phpversion php_logo_guid php_sapi_name php_uname putenv set_magic_quotes_runtime set_time_limit zend_logo_guid version_compare zend_version
Description
string php_sapi_name(void)
php_sapi_name retourne une chaîne en minuscule qui décrit le type d'interface utilisé en le serveur web et PHP (Server API, SAPI). En CGI PHP, cette chaîne est "CGI", en mod_php pour Apache, cette chaîne est "apache", etc...
<?php$inter_type = php_sapi_name();if ($inter_type == "cgi") print "Vous utilisez CGI PHP\n";else print "Vous n'utilisez pas CGI PHP\n";?>