php - File content variable value -


first.php:

<?php $name ="somthing"; ?> 

second.php

$data = file_get_contents(first.php); 

now want $name variable value $data variable. how it?

change second.php to:

include 'first.php'; echo $name; 

output "somthing"


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -