html5发布表单到服务器,如何在客户端从服务器打开链接?

时间:2014-03-20 19:20:25

标签: php html5 rest client-server restful-url

我有一个客户端(jqm,html5)和服务器端的网站(php中的其他api)。

所以我的问题是这样的:

我有一个简单的帖子

<form  name="loginform" method="post" action="http://serveraddress/sn/logout"> 
           <input type='text' name="user" placeholder="Username" style="text-align: center" required/>  
           <input type="password" name="password"  placeholder="Password" style="text-align: center" required/>   
          <input  type="submit" value="Sign In" data-icon='check'/>
          </form

&GT;

logout是服务器上的一项功能。

 /**
     * Logs in a user with the given username and password POSTed. 
     *
     * @url POST /sr/logout
     */
    public function logout()
    {
   header("Location: http:...logout.html"); //whatever address
     }

注销功能显示注销页面。但是没有在地址栏中显示它。 它显示http:... logout而不是http:... logout.html !!

为什么会这样做?

谢谢!

0 个答案:

没有答案