Member Avatar

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.

Recommended Answers

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.

Jump to Post

All 2 Replies

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

Ya file_get_contents ;) Good one, thanks buddy!

Be a part of the DaniWeb community

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