When I read the ci code, I found that processing the URI is not needed according to the php runtime environment. How can we determine the php runtime environment? We generally run our php program under apache. Of course, some people use the IIS environment. If we want to know what the current environment is, then we can use the php_sapi Function _
When I read the ci code, I found that processing the URI is not needed according to the php runtime environment. How can we determine the php runtime environment? We generally run our php program under apache. Of course, some people use the IIS environment. If we want to know what the current environment is, then we can use the php_sapi Function _
When I read the ci code, I found that processing the URI is not needed according to the php runtime environment.
How can we determine the php runtime environment?
We generally run our php program under apache, and some of them use the IIS environment.
If we want to know what the current running environment is, we can test it using the php_sapi_name () function.
Code:
Echo php_sapi_name ();
?>
The output result in the apache environment is "apache2handler ";
In cgi Mode, the output result is "cgi-fcgi"
If it is run in command line mode, the output result is: "cli"
Based on this content, we can determine what the current running environment is!
How can I run it in the command line?
As follows:
Enter the address where DOS enters the php.exe file. For example, my address is: d:/wamp/bin/php/php5.3.3/
Input php.exe "absolute file path", for example, php.exe d:/wamp/www/info. php.
Yes.