當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。