Ask coding questions

← Back to all posts
How to get secrets from PHP?
Leo32345

I have heard how to get secrets using Node.js and Java, but I have not figured out how to do so using PHP.

Does anyone know how to do this?

Answered by ch1ck3n [earned 5 cycles]
View Answer
Voters
Leo32345
Comments
hotnewtop
ch1ck3n
Leo32345

@ch1ck3n Thanks for the quick reply, but that didn't work for me.

Even though I copied your exact code and I do have a secret named SECRET, the webpage is blank.

ch1ck3n

@Leo32345 check the capitalization

Leo32345

@ch1ck3n It was capitalized correctly, but it works now.
Thanks for the support.

ch1ck3n

@Leo32345 wait what ok??

Leo32345

@ch1ck3n I'm guessing that I needed to restart the server for new envs to work, that probably caused the issue.