Accessing variables in another file with PHP -


How can I get variable values ​​from another file in php? To get the value of $ name stored in file 1, I need a file and store it as a variable

file1.php:

  $ name = "myname"; $ Name echo;   

file2.php:

  $ name = ""    

Add it at the top of the file 2.php:

 Include  ('file1.php');    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -