Welcome Guest, Not a member yet? Register   Sign In
Everything seems to work, except $_GET
#6

[eluser]skunkbad[/eluser]
[quote author="Adam" date="1307635034"][quote author="skunkbad" date="1307582771"]As far as I can tell, the php manual makes it clear that php_sapi_name() isn't reliable between server types, so you're method may only work on certain servers.[/quote]

No, the PHP manual does not say that; it's a perfectly acceptable way to determine if the script is being executed from the command line.

* http://php.net/php_sapi_name
* https://github.com/search?type=Code&lang..._sapi_name[/quote]

Not arguing, but I got the impression that it may not be reliable based on the description:

Quote:Returns a lowercase string that describes the type of interface (the Server API, SAPI) that PHP is using. For example, in CLI PHP this string will be "cli" whereas with Apache it may have several different values depending on the exact SAPI used. Possible values are listed below.

Maybe I was just reading that too fast. I think what it is saying is that Apache may return several different values, not CLI PHP. What do you think of the way the CI team handled it in 2.0.2?


Messages In This Thread
Everything seems to work, except $_GET - by El Forum - 01-30-2011, 10:44 PM
Everything seems to work, except $_GET - by El Forum - 01-31-2011, 09:49 PM
Everything seems to work, except $_GET - by El Forum - 06-08-2011, 03:17 AM
Everything seems to work, except $_GET - by El Forum - 06-08-2011, 02:26 PM
Everything seems to work, except $_GET - by El Forum - 06-09-2011, 04:57 AM
Everything seems to work, except $_GET - by El Forum - 06-09-2011, 10:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB