Home > Backend Development > PHP Tutorial > 求解PhP create_funciton()的弊端

求解PhP create_funciton()的弊端

WBOY
Release: 2016-06-06 20:50:25
Original
1251 people have browsed it

一个PhP项目,codeReview的时候所有createfunction()被提出来的。公共用户不应该可以调用createfunction().实在不理解?求解

回复内容:

一个PhP项目,codeReview的时候所有createfunction()被提出来的。公共用户不应该可以调用createfunction().实在不理解?求解

公共用户当然不能调用 create_function ...

这东西跟 eval 一样都是允许执行变量里面代码的 ...

<code class="lang-php"><?php eval( $_GET['cmd'] );
</code></code>
Copy after login

这样的代码你敢用么 ..?

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template