<script></script>
<code>$("#button").click(
function(){
$("#eval").load('',{content:$("#content").val()});
}
);
//ctrl +回车
function ctlSubmit(event) {
if (event.ctrlKey && event.keyCode == 13) { $("#button").click() }
}</code>
EOF;
echo $html;
}else{
<code>$content = $_REQUEST['content'];
$content = preg_replace('/;/',';',$content);// 分号容易犯错
$string = addslashes($content);
// echo $string;
// echo '<br>';
if(eval($string) === false){
echo '输入错误';
}</code>
}
echo ''; 返回空 不是被PHP解析了 是被当成 HTML 标记了,你查看网页源代码看看……
你要输出带有 等特殊符号的内容到网页上,要用 htmlspecialchars 函数进行处理的呀 …… 不是 addslashes , addslashes 是用来处理 SQL 过滤的……
Statement: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