Java123社区 - 轻松开发从此开始! 请登陆 免费注册

Java123社区

当前位置:主页 > Web开发 > PHP > 基础编程 >

新人提问:竟然输出一片空白

时间:2012-07-06 18:47  浏览:
?xml version=1.0 encoding=UTF-8 ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml lang=zh xml:lang=zh head titleJazz Legends - Miles Davis/title
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh">
<head>
<title>Jazz Legends - Miles Davis</title>
</head>
</p>
<body>
是不是要加个echo

<form action="index.php" method="post">
<p>
Provide up to six keywords that you believe best describe the state in
which you live:
</p>
<p>
好了,谢谢
Keyword 1:<br />
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
</p>
<p>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Keyword 2:<br />
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
<p>
Keyword 3:<br />
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
</p>
<p>
Keyword 4:<br />
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
</p>
<p>
Keyword 5:<br />
</p>
<p>
Keyword 6:<br />
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
<input type="text" name="keyword[]" size="20" maxlength="20" value=http://topic.csdn.net/u/20120623/17/""/>
</p>

<p><input type="submit" value=http://topic.csdn.net/u/20120623/17/"Submit!"/></p>
</form>
</body>
</html>

index.php:
<?php
function sanitize_data(&$value, $key) {
$value = http://topic.csdn.net/u/20120623/17/strip_tags($value);
}

array_walk($_POST['keyword'], "sanitize_data");
?>

输入数据后提交转到index.php输出竟然一片空白。。。。为什么呢?完全不关单引号双引号的事!


    顶一下
    (0)
    0%
    踩一下
    (0)
    0%
    ------分隔线------