当前位置: 首页>>代码示例>>PHP>>正文


PHP History::getHistory方法代码示例

本文整理汇总了PHP中History::getHistory方法的典型用法代码示例。如果您正苦于以下问题:PHP History::getHistory方法的具体用法?PHP History::getHistory怎么用?PHP History::getHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在History的用法示例。


在下文中一共展示了History::getHistory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getHistorys

 public static function getHistorys($arr)
 {
     if (!$arr) {
         return null;
     }
     foreach ($arr as $value) {
         $historys[] = History::getHistory($value);
     }
     if (isset($historys)) {
         return $historys;
     } else {
         return null;
     }
 }
开发者ID:sollian,项目名称:logo_doctor,代码行数:14,代码来源:History.php

示例2: json_encode

                    //$index_a[2] == book id
                    if (count($index_a) == 3) {
                        $stats = new Stats($index_a[0], $index_a[2]);
                        $res['stats'] = $stats->printStats();
                    } else {
                        //As there are no "global" stats for users yet (haven't come up with a reason to have it, and what it would include)
                        $res['error'] = 'Ingen bruker er spesifisert.';
                    }
                }
            }
        } else {
            if ($index_a[0] == "global") {
                if (!isset($index_a[1])) {
                } else {
                    if ($index_a[1] == "history") {
                        if (!isset($index_a[2])) {
                            //Display global history of lended books
                            require 'history.class.php';
                            $history = new History();
                            $res['history'] = $history->getHistory();
                        } else {
                        }
                    }
                }
            }
        }
    }
} else {
    //Default page
}
echo json_encode($res);
开发者ID:toyenyouthlibrary,项目名称:backend,代码行数:31,代码来源:index-api.php

示例3: iconv

    $img_path = $img_path . $_FILES['file']['name'];
    $target_path = ".." . $img_path;
    $target_path = iconv("UTF-8", "gb2312", $target_path);
    if (!move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
        echo $target_path;
        echo "服务器保存文件失败";
    } else {
        chmod($target_path, 511);
        $history = new History(null, $user, null, $img_path, null, null, null);
        /**
         * 插入
         */
        $sql = $history->getInsertSql(TABLE_HISTORY, $user);
        $mysql = new MySql();
        $mysql->query($sql);
        /**
         * 查询
         */
        $sql = "SELECT `id` FROM " . TABLE_HISTORY . " WHERE img='" . $img_path . "'";
        $result = $mysql->query($sql);
        $value = $mysql->fetcharray($result);
        $history = History::getHistory($value);
        echo $history->id;
        /**
         * 开启匹配程序
         */
        $fp = fsockopen("localhost", 80);
        fputs($fp, "GET /logodoctor/php/processCore.php?path={$target_path}\r\n\r\n");
        fclose($fp);
    }
}
开发者ID:sollian,项目名称:logo_doctor,代码行数:31,代码来源:uploadFile.php


注:本文中的History::getHistory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。