本文整理汇总了PHP中base::baseUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP base::baseUrl方法的具体用法?PHP base::baseUrl怎么用?PHP base::baseUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base
的用法示例。
在下文中一共展示了base::baseUrl方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirectUrl
public function redirectUrl($controller, $action = "base")
{
$baseurl = base::baseUrl();
$url = $baseurl . "/{$controller}/{$action}";
header("location: {$url}");
die;
}
示例2: addAjaxComponent
public function addAjaxComponent($container, $controller, $action = "base", $extra = "{}")
{
$basepath = base::baseUrl();
$url = $basepath . "/{$controller}/{$action}";
$data = "<script>\n\t\t\$(document).ready(function(){\n\t\t\t\$('#{$container}').load('{$url}',{$extra});\n\t\t});\n\t\t</script>";
return $data;
}
示例3: addBluePrint
public function addBluePrint($iehack = false)
{
$basepath = base::baseUrl();
echo "<style type=\"text/css\"> @import \"{$basepath}/core/styles/bp.css\"; </style>";
if ($iehack) {
echo "<!--[if IE]><link rel=\"stylesheet\" href=\"{$basepath}/core/styles/ie.css\" type=\"text/css\" media=\"screen, projection\"><![endif]-->";
}
}
示例4: dashboard
function dashboard()
{
$baseurl = base::baseUrl();
$this->use_view = false;
$username = $this->session->username;
if (!empty($username)) {
echo "<h1 style='margin-bottom:25px;'>Welcome to your blog</h1>";
echo "You can now create your blog post or <a href='{$baseurl}/blog/logout'>Logout</a>";
}
}
示例5: _loadTemplate
public static function _loadTemplate($controller, $template, $vars, $uselayout = false)
{
global $debug, $debugparts;
if ($debug) {
$_vars = $vars;
unset($_vars["app"]);
unset($_vars["lang"]);
$debugparts[] = array("type" => "view", "value" => array("viewfile" => $template, "controller" => $controller, "params" => $_vars, "layout" => $uselayout));
}
extract($vars);
$baseurl = base::baseUrl();
if ($uselayout) {
ob_start();
}
$templatefile = "app/views/{$controller}/{$template}.php";
if (file_exists($templatefile)) {
include_once $templatefile;
} else {
throw new Exception("View '{$template}.php' is not found in views/{$controller} directory.");
}
if ($uselayout) {
//die("using layout)");
$layoutdata = ob_get_clean();
$layoutfilelocal = "app/views/{$controller}/{$controller}.php";
$layoutfileglobal = "app/views/layouts/{$controller}.php";
if (file_exists($layoutfilelocal)) {
include_once $layoutfilelocal;
} else {
if (file_exists($layoutfileglobal)) {
include_once $layoutfileglobal;
} else {
echo $layoutdata;
}
}
}
}
示例6: addYahooUIFromGoogle
function addYahooUIFromGoogle()
{
$base = base::baseUrl();
echo "<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/yui/2.7.0/build/yuiloader/yuiloader-min.js' ></script>\n";
}
示例7: getUrl
function getUrl($filename = "")
{
$imagepath = base::baseUrl() . "/app/images/{$filename}";
return $imagepath;
}
示例8: getCurrentURL
function getCurrentURL()
{
$router = loader::load("router");
$url = base::baseUrl() . "/" . $router->getRoute();
return $url;
}
示例9: url
private static final function url($url)
{
self::$baseUrl = $url;
return self::$baseUrl;
}
示例10: header
<?php
header("Content-type: text/javascript; charset: UTF-8");
?>
var baseUrl = "<?php
echo base::baseUrl();
?>
";
function addFLVPlayer(playerurl,url, width, height, container,preview, allowfullscreen)
{
var s1 = new SWFObject(playerurl,"single",width,height,"7");
s1.addParam("allowfullscreen",allowfullscreen);
s1.addVariable("file",url);
if (preview!="")
s1.addVariable("image",preview);
s1.addVariable("width",width);
s1.addVariable("height",height);
s1.write(container);
function isIE()
{
if (document.all) return true;
return false;
}
function submitForm(formId)
{
formId = "#"+formId;
//if (!action)