本文整理匯總了PHP中WPFB_Core::InitDirectScriptAccess方法的典型用法代碼示例。如果您正苦於以下問題:PHP WPFB_Core::InitDirectScriptAccess方法的具體用法?PHP WPFB_Core::InitDirectScriptAccess怎麽用?PHP WPFB_Core::InitDirectScriptAccess使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WPFB_Core
的用法示例。
在下文中一共展示了WPFB_Core::InitDirectScriptAccess方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: define
// ##########################################################
// ############# THIS FILE IS DEPRECATED!! ############
// ##########################################################
// ##########################################################
// ob_start();
define('WPFB_NO_CORE_INIT', true);
define('WP_INSTALLING', true);
// make wp load faster
if (empty($_GET['rp'])) {
// if rel path not set, need to load whole WP stuff to get to path to custom CSS!
require_once dirname(__FILE__) . '/../../../cms/wp-load.php';
}
require_once dirname(__FILE__) . '/wp-filebase.php';
// this only loads some wp-filebase stuff, NOT WP!
wpfb_loadclass('Core');
WPFB_Core::InitDirectScriptAccess();
$file = WPFB_Core::GetOldCustomCssPath(stripslashes(@$_GET['rp']));
//echo $file;
//@ob_end_clean();
if (empty($file) || !@file_exists($file) || !@is_writable($file)) {
// TODO: remove writable check? this is for security!
$file = WPFB_PLUGIN_ROOT . 'wp-filebase.css';
}
$ftime = filemtime($file);
header("Content-Type: text/css");
header("Cache-Control: max-age=3600");
header("Last-Modified: " . gmdate("D, d M Y H:i:s", $ftime) . " GMT");
header("Content-Length: " . filesize($file));
if (!empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) && @strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $ftime) {
header("HTTP/1.x 304 Not Modified");
exit;