Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetEnv API_USERNAME 'my_special_username'
- SetEnv API_PASSWORD 'my_special_password'
- echo $_SERVER['API_USERNAME'];
- echo $_SERVER['API_PASSWORD'];
- // or
- echo getenv('API_USERNAME');
- echo getenv('API_PASSWORD');
- [Service]
- Environment="API_USERNAME=my_special_username"
- Environment="API_PASSWORD=my_special_password"
- echo getenv('API_USERNAME');
- echo getenv('API_PASSWORD');
- // $_SERVER does not work when I specify environment variables in systemd
- echo $_SERVER['API_USERNAME']; // returns blank
- echo $_SERVER['API_PASSWORD']; // returns blank
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement