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


PHP Action函数代码示例

本文整理汇总了PHP中Action函数的典型用法代码示例。如果您正苦于以下问题:PHP Action函数的具体用法?PHP Action怎么用?PHP Action使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: DownloadBengou

function DownloadBengou($job)
{
    $args = $job->workload();
    list($bookid, $chapterid) = explode(",", $args);
    //$bookid = "4182";
    //$chapterid = 0005012703;
    return Action(CBenGou::$siteid, $bookid, intval($chapterid));
}
开发者ID:guozanhua,项目名称:bookspider,代码行数:8,代码来源:comic-worker.php

示例2: DoDownload

function DoDownload($job)
{
    $args = $job->workload();
    list($bookid, $chapterid) = explode(",", $args);
    //$bookid = "7_3283_1";
    //$chapterid = 161405;
    return Action($bookid, $chapterid);
}
开发者ID:guozanhua,项目名称:bookspider,代码行数:8,代码来源:pingshu8-worker.php

示例3: DoDownload

function DoDownload($job)
{
    sleep(17);
    $args = $job->workload();
    list($bookid, $chapterid) = explode(",", $args);
    //$bookid = "4182";
    //$chapterid = 0005012703;
    return Action($bookid, intval($chapterid));
}
开发者ID:guozanhua,项目名称:bookspider,代码行数:9,代码来源:ysts8-worker.php

示例4: Action

/*
*	@pageAction.php
*	Copyright (c)2013-2014 Mallmold Ecommerce(HK) Limited. 
*	http://www.mallmold.com/
*	
*	This program is free software; you can redistribute it and/or
*	modify it under the terms of the GNU General Public License
*	as published by the Free Software Foundation; either version 2
*	of the License, or (at your option) any later version.
*	More details please see: http://www.gnu.org/licenses/gpl.html
*	
*	If you want to get an unlimited version of the program or want to obtain
*	additional services, please send an email to <service@mallmold.com>.
*/
require Action('common');
class pageAction extends commonAction
{
    public function index()
    {
        $page_id = $this->model('urlkey')->getid('page_id');
        if (!$page_id) {
            $this->_404();
            return;
        }
        $page = $this->model('mdata')->table('pages')->where("id={$page_id}")->get();
        if (!$page) {
            $this->_404();
            return;
        }
        //parse tag
开发者ID:Jeremysoft,项目名称:mallmold,代码行数:30,代码来源:pageAction.php

示例5: Action

<?php

function Action($url)
{
    $title = $url;
    $caption = $url . 'のページ';
    $text = 'これは' . $url . 'のページです';
    return compact('title', 'caption', 'text');
}
function View($params)
{
    extract($params);
    include './layout.php';
}
View(Action($_GET['url']));
开发者ID:yinm,项目名称:yinm.github.io,代码行数:15,代码来源:index.php

示例6: array

<?php

/*
* Example routes
* Ticket routes
*/
use actions;
return array('Controller' => 'Ticket', 'first_pattern' => 'tickets{a}', 'GET' => array('id' => '[0-9]+'), 'pattern' => array(array('pattern' => 'tickets/'), array('pattern' => 'tickets/{page}', 'action' => Query('OnShow', 'page'), 'GET' => array('page' => '[0-9]+')), array('pattern' => 'tickets/add', 'action' => Action('onAdd'), 'event' => Form('form')), array('pattern' => 'tickets/edit/{id}', 'action' => Query('onEdit', 'id')), array('pattern' => 'tickets/delete{id}', 'action' => Query('onDelete', 'id')), array('pattern' => 'tickets/see/{id}', 'action' => Query('onShowTicket', 'id'))));
开发者ID:silversthem,项目名称:simPHPle,代码行数:8,代码来源:routes.php

示例7: Route

<?php

/* Route example */
$route = new Route('example', 'Index');
// Creating a route with a controller, the model will be extracted by the getModel method
$route->add(array('', 'index.html'), function () {
    // When the url is index.html -> call Closure
    echo 'Hello world';
});
$route->add(array('article-{id}.html', 'id' => '[0-9]+'), Query('getArticle', Get('id')), Action('showArticle'));
// Calling model method getArticle and giving result to controller method showArticle
$route->add(array('articles.html/{page?}', 'page' => '[0-9]+'), Query('getArticles', array(Get('page'), QUERY_ELSE => 0)), Action('showArticles'));
// Then feeding the result to showArticles method
$route->add('article-create', Permission(), Event('getFormEvent', array(Query('newArticle', Get('name')), Action('showArticle'), EVENT_ELSE => Action('writeArticle'))));
// // If the form isn't completed, show the writeArticle form
return $route;
开发者ID:silversthem,项目名称:simPHPle,代码行数:16,代码来源:route.php

示例8: Couple_Action

function Couple_Action($modelAction, $viewAction)
{
    return array('model' => Action($modelAction), 'view' => Action($viewAction), 'couple_action' => true);
}
开发者ID:silversthem,项目名称:simPHPle,代码行数:4,代码来源:module.php

示例9: print_r

    if (in_array($net["ip"], $servers)) {
        $ip = $net["ip"];
        break;
    }
}
if (strlen($ip) < 1) {
    print_r("server ip error.");
    return -1;
}
$sites = array("ysts8" => 2);
print_r("ip: {$ip}\n");
print_r("action: remove files\n");
list($files0, $files1) = ActionRemoveFile();
// remove pingshu8/ysts8 files
print_r("action: add files\n");
$files2 = Action();
// add file to db
print_r("------------------------------------------------------\n");
print_r("clean uri: {$files0}, remove: {$files1}\n");
print_r("add files: {$files2}\n");
print_r("------------------------------------------------------\n");
function Action()
{
    global $db;
    global $ip;
    global $cols;
    global $sites;
    $num = 0;
    foreach ($sites as $sitename => $siteid) {
        $dirs = array("/ts/{$sitename}", "/ts2/{$sitename}", "/home/{$sitename}");
        foreach ($dirs as $dir) {
开发者ID:guozanhua,项目名称:bookspider,代码行数:31,代码来源:pingshu8-rm.php

示例10: dbopen

<?php

require "php/db.inc";
require "php/http.inc";
$db = dbopen("pingshu", "115.28.54.237");
if ($db->connect_errno) {
    echo "mysql error " . $db->connect->error;
    return;
}
if (count($argv) < 2) {
    print_r("please input server ip");
    return -1;
}
Action($argv[1]);
function Action($ip)
{
    global $db;
    $sql = sprintf("select bookid, chapterid, uri from pingshu8");
    $res = $db->query($sql);
    if (!$res) {
        print_r("Action failed: " . $db->error);
        return -1;
    }
    $chapters = array();
    while ($row = $res->fetch_assoc()) {
        $bookid = $row["bookid"];
        $chapterid = $row["chapterid"];
        $uri = $row["uri"];
        if (strlen($uri) > 0) {
            Download($ip, $bookid, $chapterid, $uri);
        }
开发者ID:guozanhua,项目名称:bookspider,代码行数:31,代码来源:korea-worker.php

示例11: Action

<?php

/*
*	@errorAction.php
*	Copyright (c)2013-2014 Mallmold Ecommerce(HK) Limited. 
*	http://www.mallmold.com/
*	
*	This program is free software; you can redistribute it and/or
*	modify it under the terms of the GNU General Public License
*	as published by the Free Software Foundation; either version 2
*	of the License, or (at your option) any later version.
*	More details please see: http://www.gnu.org/licenses/gpl.html
*	
*	If you want to get an unlimited version of the program or want to obtain
*	additional services, please send an email to <service@mallmold.com>.
*/
require_once Action('common');
class errorAction extends commonAction
{
    public function __404($msg = '')
    {
        header("HTTP/1.1 404 Not Found");
        $this->view['msg'] = $msg;
        $this->view('error/404.html');
    }
}
开发者ID:Jeremysoft,项目名称:mallmold,代码行数:26,代码来源:errorAction.php


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