php - Calling environment variables inside class not working -


I'm not sure why this is not working? I want to be able to access the set set in my .env.php file, but NetBeans is showing an error that the getenv function is not recognized.

This is my code

  & lt ;? Php class Blast Extends Lectures {... Protected $ connection = getenv ('DB_NAME'); }  

Set the value of the class from the manufacturer.

  class Blah provides eloquent {protected $ connection = null; Function __ conversion () {$ this- & gt; Connection = getenv ('DB_NAME'); }}  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -