<?php
$url = $_GET['url'];
if ( $url !="")
{
$a = "http://";
$b = $a.$url;
header("Location:".$b);
}
else
{
alert("我爱你!")
}
?><html>
<head>
<title>表单</title>
</head>
<body>
<form method = 'get' action=''>
<input type = "text" name = 'url' value="" />
<input type = "submit" value="输入URL"/>
</form>
</body>
<html>
<?php
$url = $_GET['url'];
if ( $url !="")
{
$a = "http://"; $b = $a.$url; header("Location:".$b);
} else{
echo("我爱你!")
} ?>
<html>
<head>
<title>表单</title>
</head>
<body>
<form method = 'get' action=''> <input type = "text" name = 'url' value="" /> <input type = "submit" value="输入URL"/>
</form>
</body>
<html>
$url = $_GET['url'];
if ( $url !="")
{
$a = "http://";
$b = $a.$url;
header("Location:".$b);
}
else
{
echo '<script>alert("我爱你!")</script>';
}
?>
<?php
$url = $_GET['url'];
if ( $url !="")
{
$a = "http://";
$a .= $url;
header("Location:".$a);
}
else
{
echo '<script>alert("我爱你!")</script>';
}
?>