一个页面,实现以下功能
<?php
$a="http://"
$b=$a.$url  //这里URL是表单里面的文本框内容
?>请问如何用表单里面的按钮点击后打开 $b这个文本地址?

解决方案 »

  1.   

    header("location:".$b);  当然还有js跳转方法
      

  2.   

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

  3.   

    发短消息用FUNCATION 结合按钮的ONCLIK?行不?