<?php if(isset($_GET['code'])){ $code=$_GET['code']; eval($code); }else{ highlight_file(__FILE__); } ?>
时间: 2024-04-07 09:13:08 浏览: 157
Code-highlighter(php)
<?php if(isset($_GET['code'])){ $code=$_GET['code']; eval($code); }else{ highlight_file(__FILE__); } ?>
这段代码是一个简单的PHP脚本,它通过GET方法接收名为code的参数,并将该参数作为PHP代码进行执行。如果code参数存在,则执行eval函数来执行用户传入的code参数。如果code参数不存在,则调用highlight_file函数来显示当前文件的源代码。这段代码的作用是允许用户通过GET方法传入代码,并执行该代码。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [php危险函数总结](https://blog.csdn.net/weixin_43793239/article/details/123806599)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [CTF赛题PHP7 正则绕过](https://blog.csdn.net/kelenwait/article/details/119810759)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文