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


PHP Setup::run方法代码示例

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


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

示例1: header

<?php

/*******************************************************
 * Copyright (C) 2015 Muhammad Juan Akbar - All Rights Reserved
 * Written by Muhammad Juan Akbar <mail@mjuanakbar.info>, 07 2015
 *
 * index.php can not be copied and/or distributed without the express
 * permission of author.
 *******************************************************/
namespace resapi;

require 'vendor/autoload.php';
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
    if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']) && ($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'GET' || $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'POST' || $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'DELETE' || $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] == 'PUT')) {
        header('Access-Control-Allow-Origin: *');
        header("Access-Control-Allow-Credentials: true");
        header('Access-Control-Allow-Headers: X-Requested-With');
        header('Access-Control-Allow-Headers: Content-Type, api-token, www-authorization');
        header('Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT');
        // http://stackoverflow.com/a/7605119/578667
        header('Access-Control-Max-Age: 86400');
    }
    exit;
}
$app = new Setup();
$app->run();
开发者ID:jeins,项目名称:bellmasjid,代码行数:26,代码来源:index.php

示例2: copy_folder

        }
    }
    private function copy_folder($src, $dest)
    {
        if (is_win()) {
            $this->execute("xcopy {$src} {$dest} /S/I/Y/Q >log.txt");
        } else {
            $this->execute("cp -fR {$src} {$dest}");
        }
    }
    private function copy_file($src, $dest)
    {
        if (is_win()) {
            $this->execute("copy {$src} {$dest} /Y >log.txt");
        } else {
            $this->execute("cp -fR {$src} {$dest}");
        }
    }
    private function execute($command)
    {
        if (!is_array($command)) {
            $command = array($command);
        }
        foreach ($command as $cmd) {
            passthru($cmd);
        }
    }
}
$setup = new Setup();
$setup->run();
开发者ID:Rebelo,项目名称:GXT-ADMZ,代码行数:30,代码来源:setup.lib.php

示例3: testRun

 public function testRun()
 {
     $q = 'SELECT something';
     $this->connection->expects($this->once())->method('multiQuery')->with($q);
     $this->object->run($q);
 }
开发者ID:,项目名称:,代码行数:6,代码来源:


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