
eval
(PHP 4, PHP 5)
eval — 把字符串作为PHP代码执行
说明
mixed eval
( string $code
)
把字符串 code 作为PHP代码执行。
Caution
The eval() language construct is very dangerous
because it allows execution of arbitrary PHP code. Its use thus is
discouraged. If you have carefully verified that there is no other option
than to use this construct, pay special attention not to pass any user
provided data into it without properly validating it beforehand.
参数
code
需要被执行的字符串
代码不能包含打开/关闭 PHP tags。比如,echo “Hi!”; must be passed instead of
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...