* /
$ version = apache_get_version (); // Obtain the apache version and assign it to the variable
echo "$ version"; // output the result
$ server_ip = apache_getenv ("server_addr"); // Obtain the server's ip information by getting the environment variable function
Echo $ server_ip; / / output results
$ url_info = apache_lookup_uri ('2-1.php tutorial'); // execute request on url and return message
print_r ($ rul_info); // output the content of the result
if (file_exists ($ rul_info-> filename)) // if the result of the return value
{
echo 'file exists!'; / / output the corresponding content
}
apache_note ("name", "days of the soul"); / / Set the request record x name value
echo apache_note ("name"); / / Get the name of the request record in apache
$ headers = apache_request_headers (); // Get http request headers
foreach ($ headers as $ header => $ value) // Output the result array by looping
{
echo "$ header: $ value <br> n"; // Output array key / value pairs
}
$ result = apache_get_modules (); / / return apache loaded module list, and assigned to the variable
print_r ($ result); // Output the result array
if (apache_setenv ("example_var", "test_value")) // Set environment variables
{
echo "apache environment variable example_var set successfully!"; / / If the output is set successfully
}
else
{
Echo "apache environment variable example_var failed to set up!"; / / If output failed to set up
}