php - Accessing $_SERVER variables from command line -
how access $_server variables i've set command line in php?
when seek phone call php method i've created next error, shows $_server
variables defined when 1 calls app via urls, i.e., webserver:
error - undefined index: my_var /www/html/some_file.php error - undefined index: my_other_var /www/html/some_file.php
to more specific i'm using codeigniter, don't believe issue.
thoughts?
if you're setting server variables in web server config, won't nowadays when access php via command line. (since web server won't involved @ all.)
to utilize $_server
variables in cli php script, see: set $_server variable when calling php command line?
to summarize:
run: value_one=1 another_value=2 php cli.php
php codeigniter command-line environment-variables server-variables
No comments:
Post a Comment