Is it possible to include a php script (which gi开发者_JAVA技巧ven 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.
You can create temporary file and execute it then with something like
exec("php -f /path/to/temporary/script.php");
精彩评论