本文整理汇总了PHP中utility::get_base方法的典型用法代码示例。如果您正苦于以下问题:PHP utility::get_base方法的具体用法?PHP utility::get_base怎么用?PHP utility::get_base使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility
的用法示例。
在下文中一共展示了utility::get_base方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_url
/**
* Check url base from get[url]
* validates from accepted urls only
*
* @param none
* @return mixed | displays main screen.
*/
protected static function check_url()
{
$file_loc = utility::get_base();
if (isset($_GET["url"]) && !empty($_GET["url"])) {
$url = trim($_GET["url"]);
if (strpos($url, "/") > -1) {
header("Location:{$file_loc}");
exit;
} else {
// to prevent call from outside ajax
if (in_array($url, self::$clean_url) && !empty($_POST["args"])) {
return $url;
} else {
header("Location:{$file_loc}");
exit;
}
}
} else {
return false;
}
}
示例2: and
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Main Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
<link rel="stylesheet" type="text/css" href="styles/rst.css" media="screen" />
<link rel="stylesheet" type="text/css" href="styles/large.css" media="screen and (min-width:1010px)" />
<link rel="stylesheet" type="text/css" href="styles/medium.css" media="screen and (min-width:820px) and (max-width:1009px)" />
<link rel="stylesheet" type="text/css" href="styles/mobile.css" media="screen and (max-width:819px)" />
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/json.js"></script>
<script type="text/javascript" src="scripts/main.js"></script>
</head>
<body>
<input type="hidden" id="base_url" value="<?php
echo utility::get_base();
?>
">
<div id="header">
TESTAPP
</div>