php - $_SERVER["SCRIPT_URL"]: when is it reliably present? -



php - $_SERVER["SCRIPT_URL"]: when is it reliably present? -

in local environment (php 5.4.24 on apache 2.2.26) $_server["script_url"] present, read around variable not present, though couldn't find when , when isn't.

i'd know required variable reliably present.

this variable depends on server's configuration.

when using nginx php5-fpm (fcgi) example, you'd pass variable fpm_parameter:

fastcgi_param script_name $fastcgi_script_name;

there similiar configuration scgi.

there 3 types of global variables in $_server, taken client's request header , not reliable, set php/webserver (for illustration remote_addr) , reliable, , depend on configuration can reliable depending on configuration.

php compatibility server-variables

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -