thinkphp5 跳轉(zhuǎn)方式

<FORM method="post" enctype="multipart/form-data" class="form" action="{:url('bbox/submitbbox',array('imgid'=>$img.id))}"><!--此處是跳轉(zhuǎn)位置-->
Image Labels:{$img.label}<br/>
Labels:<br/>
<table border="1" width="500px">
{for start="0" end="$img.lab_num"}
<tr><td>{$labels[$i]}</td><td>(x,y)(x,y)</td><td><input class="input_box" type="text" id="cordi{$i}" name="cordi{$i}" onclick="getValue(this.id)"/></td></tr> 
{/for}
</table>
<br/>
<!--END:choose label-->
<br/>
<INPUT type="submit" class="btn" value="Submit">
</FORM>
// 文件上傳提交
    public function submitbbox()
    {
        $save_string = '';
        $bbox = input('post.');
        $imgid = input('imgid');
        foreach($bbox as $key=>$value)
        {
            $save_string = $save_string.$key.":".$value.".";
        }
        $res = db('forlab')->update(['bbox' => $save_string,'id'=>$imgid]);
        if($res){
            $this->success('successful!!!',url('index'));//此處是成功跳轉(zhuǎn)界面
        }else{
            $this->error('failed!!!');
        }
        //$text = $_POST['text'];
    }
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容