當前位置: 首頁>>代碼示例>>PHP>>正文


PHP base::baseUrl方法代碼示例

本文整理匯總了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;
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:7,代碼來源:controller.php

示例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;
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:7,代碼來源:view.php

示例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]-->";
     }
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:8,代碼來源:cssm.php

示例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>";
     }
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:10,代碼來源:blog.php

示例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;
             }
         }
     }
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:36,代碼來源:base.php

示例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";
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:5,代碼來源:jsm.php

示例7: getUrl

 function getUrl($filename = "")
 {
     $imagepath = base::baseUrl() . "/app/images/{$filename}";
     return $imagepath;
 }
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:5,代碼來源:image.php

示例8: getCurrentURL

function getCurrentURL()
{
    $router = loader::load("router");
    $url = base::baseUrl() . "/" . $router->getRoute();
    return $url;
}
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:6,代碼來源:general.php

示例9: url

 private static final function url($url)
 {
     self::$baseUrl = $url;
     return self::$baseUrl;
 }
開發者ID:suconghou,項目名稱:sprite,代碼行數:5,代碼來源:base.php

示例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)
開發者ID:mustafakarali,項目名稱:orchidframework,代碼行數:31,代碼來源:general.php


注:本文中的base::baseUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。