本文整理匯總了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'];