Member Avatar for feoperro

Hi,

If I have a home.php file and I want to store it into a $_SESSION like $_SESSION = home.php - how do I do that? I tried using include but it doesn't work... I have to have it in a session because it fits into a bigger portion of code elsewhere, is it possible to get the home.php contents and put them in the session?

Thanks,
Ashton.

You should be able to get the module with file_get_contents and then store it. If your intent is to execute that code later, then this isn't the way to go about it. You will need to provide some additional detail if that is your intent.

Member Avatar for feoperro

Ya file_get_contents ;) Good one, thanks buddy!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.