PHP code example of wycto / tp-jump

1. Go to this page and download the library: Download wycto/tp-jump library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wycto / tp-jump example snippets


namespace app\controller;

class Index 
{
    use \wycto\jump\Jump; 
    public function index()
    {
        //return $this->error('失败','data数据',['username' => 'wycto', 'sex' => '男']);
        //return $this->success('成功','data数据',['username' => 'wycto', 'sex' => '男'],'index/index');
        //return $this->redirect('/admin/index/index',302);
        //return $this->json(200,'ok','token',['name'=>'占三'],$header = []);
        return $this->result(200,'成功',['username' => 'wycto', 'sex' => '男']);  
    }