vercel-community/php

Vercel Environment Variables

BOXNYC opened this issue · 2 comments

Question

How do I access the Vercel Project's env vars in PHP? I tested:

<?php
print_r( $_ENV );
?>

And the variables I input to the project settings aren't there.

Thanks!

Hi, can you gest getenv() (https://www.php.net/manual/en/function.getenv.php) or $_SERVER variable?

getenv() worked, thanks so much!