Getenv() returns empty

Website URL

Error Message

.htaccess

SetEnv TEST “hey there!”

test.php

<?php echo getenv("TEST"); It was working fine few months ago; but now it returns empty. What could have happened?

Hello

That functionality may have been disabled with the latest PHP update.

What do you need to use environment variables for? Generally, using a config.php or .config file is better.

5 Likes

Oh okayy. We were exploring data hiding in our course. Offline/Production. We were able to find alternative, thanks anyway.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.