本文整理汇总了PHP中PerchUtil::set_security_headers方法的典型用法代码示例。如果您正苦于以下问题:PHP PerchUtil::set_security_headers方法的具体用法?PHP PerchUtil::set_security_headers怎么用?PHP PerchUtil::set_security_headers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerchUtil
的用法示例。
在下文中一共展示了PerchUtil::set_security_headers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
} else {
define('PERCH_RUNWAY', false);
}
if (!defined('PERCH_RUNWAY_ROUTED')) {
define('PERCH_RUNWAY_ROUTED', false);
}
// Essentials used on every request - no point autoloading
include PERCH_CORE . '/lib/PerchDB.class.php';
include PERCH_CORE . '/lib/PerchDB_MySQL.class.php';
include PERCH_CORE . '/lib/PerchUtil.class.php';
include PERCH_CORE . '/lib/Perch.class.php';
include PERCH_CORE . '/lib/PerchFactory.class.php';
include PERCH_CORE . '/lib/PerchBase.class.php';
include PERCH_CORE . '/lib/PerchSystem.class.php';
include PERCH_CORE . '/lib/PerchTemplate.class.php';
include PERCH_CORE . '/lib/PerchFieldType.class.php';
include PERCH_CORE . '/lib/PerchFieldTypes.class.php';
include PERCH_CORE . '/lib/PerchXMLTag.class.php';
include PERCH_CORE . '/lib/PerchResourceBuckets.class.php';
include PERCH_CORE . '/lib/PerchResourceBucket.class.php';
if (PERCH_RUNWAY) {
include PERCH_CORE . '/runway/runtime.php';
}
if (!defined('PERCH_SECURITY_HEADERS') || PERCH_SECURITY_HEADERS === true) {
PerchUtil::set_security_headers();
}
if (!PERCH_RUNWAY_ROUTED && isset($_SERVER['SCRIPT_FILENAME'])) {
if ($_SERVER['SCRIPT_FILENAME'] != '') {
PerchUtil::invalidate_opcache($_SERVER['SCRIPT_FILENAME']);
}
}