亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Static tool class

This tutorial is to call the static method of the static tool class to complete the pop-up window jump function

1, encapsulate the pop-up window jump Transfer method

Create tool class Tool.class.php

##The code is as follows:

<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/3 0003
 * Time: 下午 1:56
 */
class Tool{
    //執(zhí)行某個方法成功并需要跳轉(zhuǎn)到指定頁面時使用
    public static function skipPage($info,$url){
        echo "<script>alert('$info');location.href='$url';</script>";
        exit();
    }
    //某個操作執(zhí)行失敗時調(diào)用
    public static function returnPage($info){
        echo "<script>alert('$info');history.back();</script>";
    }
}

2, Calling the tool class

Directly call the skipPage() method in the Tool class when you need to jump to other pages in the future Just use the returnPage() method

Continuing Learning
||
<?php echo 工具類的調(diào)用";
submitReset Code