开发者

Isolated PHP Execution Region

开发者 https://www.devze.com 2023-03-17 07:10 出处:网络
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.

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");
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号