LOADING STUFF...

PHP:eval()的用法_misc函数

技术教程3小时前发布 北陌
29 0 0

PHP:eval()的用法_misc函数

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

© 版权声明

相关文章

暂无评论

暂无评论...