本文整理汇总了PHP中core\Config::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::load方法的具体用法?PHP Config::load怎么用?PHP Config::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core\Config
的用法示例。
在下文中一共展示了Config::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
Header("content-type: application/x-javascript");
/* Autoload libraries */
require_once '../../vendor/autoload.php';
/* Loads the config */
\Core\Config::load('../..');
?>
// Required: Common, AjaxQueueHandler
// Base URL for the ajax calls
var baseURL = <?php
echo '\'' . PROXY_PATH . '\'';
?>
+ '/';
// Sets the events
$(document).ready(function () {
// Storage module
Storage.init();
});
//
// Storage
//
(function( Storage, $, undefined ) {
// Internal variables
// Loading panel
var loadingPanel;
示例2: header
* Simplified proxy for the FPGA API ajax petitions
*
* Warning: this is not a general proxy, and it does not foward parameters and such
* It only forwards simple calls for the FPGA Web Service, with the following syntax:
* proxy.php?url=/info/status
*/
/**
* Autoload libraries
*/
require_once 'vendor/autoload.php';
/**
* Number of subparts of the URL
*/
define('RELATIVE_SUBPATHS', 0);
/* Loads the config */
\Core\Config::load();
/* Get the request */
if (!isset($_REQUEST[PROXY_ID])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found', true, 404);
header('Status: 404 Not Found');
$_SERVER['REDIRECT_STATUS'] = 404;
/* Log the call */
\Core\Logger::logProxy('[Code: 404][Method: ' . $_SERVER['REQUEST_METHOD'] . '][URL: Not Set]');
return;
}
/* Request options */
$opts = array('http' => array('method' => $_SERVER['REQUEST_METHOD'], 'timeout' => -1, 'ignore_errors' => true));
/* Timestamp */
$headers = getallheaders();
if (isset($headers['timestamp'])) {
$opts['http']['header'] = 'timestamp: ' . $headers['timestamp'];