topherg
topherg

Reputation: 4303

Isolated PHP Execution Region

Is it possible to include a php script (which given its current nature of the project, could screw it up) with only limited variables.

This is because I want to run a file as a data template, but I don't users to be able to get access to all the data. Especially on a shared service. I didn't want to use unset on every variable, because I'll need them again later.

I was hoping to be able to open a private region within the interpreter so I can run the script with only certain variables, to cut a long story short.

Thanks in advance.

Upvotes: 1

Views: 738

Answers (1)

zerkms
zerkms

Reputation: 255015

You can create temporary file and execute it then with something like

exec("php -f /path/to/temporary/script.php");

Upvotes: 2

Related Questions