• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getPath函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getPath函数的典型用法代码示例。如果您正苦于以下问题:PHP getPath函数的具体用法?PHP getPath怎么用?PHP getPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getPath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: initContent

 public function initContent()
 {
     $this->initTabModuleList();
     $this->renderPageHeaderToolbar();
     $this->admin_cms_categories->token = $this->token;
     $this->admin_cms->token = $this->token;
     if ($this->display == 'edit_category') {
         $this->content .= $this->admin_cms_categories->renderForm();
     } elseif ($this->display == 'edit_page') {
         $this->content .= $this->admin_cms->renderForm();
     } elseif ($this->display == 'view_page') {
         $fixme = 'fixme';
     } else {
         $id_cms_category = (int) Tools::getValue('id_cms_category');
         if (!$id_cms_category) {
             $id_cms_category = 1;
         }
         // CMS categories breadcrumb
         $cms_tabs = array('cms_category', 'cms');
         // Cleaning links
         $cat_bar_index = self::$currentIndex;
         foreach ($cms_tabs as $tab) {
             if (Tools::getValue($tab . 'Orderby') && Tools::getValue($tab . 'Orderway')) {
                 $cat_bar_index = preg_replace('/&' . $tab . 'Orderby=([a-z _]*)&' . $tab . 'Orderway=([a-z]*)/i', '', self::$currentIndex);
             }
         }
         $this->context->smarty->assign(array('cms_breadcrumb' => getPath($cat_bar_index, $id_cms_category, '', '', 'cms'), 'page_header_toolbar_btn' => $this->page_header_toolbar_btn, 'page_header_toolbar_title' => $this->toolbar_title));
         $this->content .= $this->admin_cms_categories->renderList();
         $this->admin_cms->id_cms_category = $id_cms_category;
         $this->content .= $this->admin_cms->renderList();
     }
     $this->context->smarty->assign(array('content' => $this->content));
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:33,代码来源:AdminCmsContentController.php


示例2: rss_feed_url

function rss_feed_url()
{
    if (getConfig('rss.output.usemodrewrite')) {
        return getPath() . $GLOBALS['rss']->currentFeed->escapedTitle . "/";
    }
    return getPath() . "feed.php?channel=" . $GLOBALS['rss']->currentFeed->cid;
}
开发者ID:jphpsf,项目名称:gregarius,代码行数:7,代码来源:feed.php


示例3: initMage

 function initMage($code = '')
 {
     $path = getPath(dirname(__FILE__), 3);
     if (file_exists($path . '/app/Mage.php')) {
         include_once $path . '/app/Mage.php';
         Mage::app($code);
     }
 }
开发者ID:liemnv,项目名称:Groupon-Clone-On-Magento,代码行数:8,代码来源:app_helper.php


示例4: print_styles

 function print_styles()
 {
     echo '<link href="' . getPath() . '/style.css" rel="stylesheet">';
     global $con;
     $result = mysqli_query($con, "SELECT css FROM css WHERE pid = " . $this->id . "");
     while ($row = mysqli_fetch_array($result)) {
         echo '<link href="' . getPath() . '/' . $row['css'] . '" rel="stylesheet">';
     }
 }
开发者ID:ayosearch,项目名称:cv-cms,代码行数:9,代码来源:profile.php


示例5: getPage

function getPage($page)
{
	global $menu;
	$p=getPath($page,$menu);
	if($p=="")
		return pageNotFound($page);
	include($p);
	return html(head().view());
}
开发者ID:BackupTheBerlios,项目名称:antargis-svn,代码行数:9,代码来源:page.inc.php


示例6: themes

function themes()
{
    $themes = getThemes();
    if (isset($_GET['theme']) && array_key_exists($_GET['theme'], $themes)) {
        $active_theme = sanitize($_GET['theme'], RSS_SANITIZER_SIMPLE_SQL | RSS_SANITIZER_NO_SPACES);
        $sql = "update " . getTable('config') . " set value_ = '{$active_theme}'" . " where key_='rss.output.theme'";
        rss_query($sql);
        rss_invalidate_cache();
    } else {
        $active_theme = getConfig('rss.output.theme');
    }
    echo "<form style=\"float:right\" method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">\n" . "<p><input type=\"hidden\" name=\"" . CST_ADMIN_DOMAIN . "\" value=\"" . CST_ADMIN_DOMAIN_THEMES . "\" />\n" . "<input type=\"submit\" name=\"admin_themes_check_for_updates\" value=\"" . __('Check for Updates') . "\" /></p>\n" . "</form>\n";
    if (isset($_POST['admin_themes_check_for_updates'])) {
        theme_getThemesUpdate($themes);
    }
    echo "<h2 class=\"trigger\">" . __('Themes') . "</h2>\n" . "<div id=\"admin_themes\" >\n";
    echo __('<p style="font-size:small">Themes are made of a set of template files which specify how your Gregarius installation looks.<br />More themes can be downloaded from the <a style="text-decoration:underline"  href="http://themes.gregarius.net/">Themes Repository</a>.</p>');
    foreach ($themes as $entry => $theme) {
        extract($theme);
        if (!$name) {
            $name = $entry;
        }
        if ($url) {
            $author = "<a href=\"{$url}\">{$author}</a>";
        }
        $active = $entry == $active_theme;
        $updateAvailable = isset($theme['updateVersion']);
        if ($screenshot) {
            $screenshotURL = "<img src=\"" . getPath() . RSS_THEME_DIR . "/{$fsname}/{$screenshot}\"  />";
        } else {
            $screenshotURL = "<img src=\"" . getPath() . RSS_THEME_DIR . "/default/media/noscreenshot.png\" />";
        }
        $h4 = "{$name}";
        $h5 = "By&nbsp;{$author} | Version:&nbsp;{$version}";
        if ($updateAvailable) {
            $h5 .= ' | <a class="update" href="' . $theme['updateUrl'] . '">Update to version ' . $theme['updateVersion'] . '</a>';
        }
        if ($htmltheme) {
            $seturl = "index.php?view=themes&amp;theme={$entry}";
        } else {
            $seturl = "";
        }
        echo "<div class=\"themeframe" . ($active ? " active" : "") . ($updateAvailable ? " hilite" : "") . "\"><span>";
        if (!$active && $htmltheme) {
            echo "<a href=\"{$seturl}\" class=\"bookmarklet\">" . __('Use this Theme') . "</a>";
        } elseif ($active) {
            echo "<p class=\"bookmarklet\">" . __('Active Theme') . "</p>";
        }
        echo "<h4>{$h4}</h4>\n";
        if (file_exists("../" . RSS_THEME_DIR . "/{$fsname}/config.php")) {
            echo "<a class=\"bookmarklet\" href=\"" . $_SERVER['PHP_SELF'] . "?" . CST_ADMIN_DOMAIN . "=" . CST_ADMIN_DOMAIN_THEME_OPTIONS . "&amp;theme=" . $entry . "&amp;" . CST_ADMIN_VIEW . "=" . CST_ADMIN_DOMAIN_THEME_OPTIONS . "\">" . __('Configure') . "</a>";
        }
        echo "<h5>{$h5}</h5>\n" . "<p class=\"themescreenshot\">{$screenshotURL}</p>" . "<p>{$description}</p>&nbsp;" . "</span></div>\n";
    }
    echo "</div>\n";
}
开发者ID:nerdling,项目名称:gregarius,代码行数:56,代码来源:themes.php


示例7: render

 function render()
 {
     $output = View::do_fetch(getPath('views/main/sitemap.php'), $this->data);
     // write the sitemap
     writeFile(APP . 'public/sitemap.xml', $output, 'w');
     // write the compressed sitemap
     writeFile(APP . 'public/sitemap.xml.gz', $output, 'w9');
     // view the Sitemap XML
     //header('Location: ./sitemap.xml');
 }
开发者ID:makesites,项目名称:kisscms,代码行数:10,代码来源:sitemap.php


示例8: __autoload

function __autoload($class_name)
{
    $path = getPath($class_name);
    if (file_exists($path)) {
        require_once $path;
        return true;
    }
    echo "Class not found: " . $path;
    return false;
}
开发者ID:webgears,项目名称:ChristmasTree_Team1,代码行数:10,代码来源:autoload.php


示例9: requestAllPages

 function requestAllPages()
 {
     $page = new Page();
     $page->tablename = "pages";
     $pages = $page->retrieve_many("date LIKE '%" . $this->data['date'] . "%'");
     $view = getPath('views/archives/body.php');
     foreach ($pages as $data) {
         $data['view'] = $view;
         $this->data['body'][] = $data;
     }
 }
开发者ID:makesites,项目名称:kisscms,代码行数:11,代码来源:archives.php


示例10: opml_export_form

function opml_export_form()
{
    if (getConfig('rss.output.usemodrewrite')) {
        $method = "post";
        $action = getPath() . "opml";
    } else {
        $method = "get";
        $action = getPath() . "opml.php";
    }
    echo "<fieldset style=\"vertical-align:top\">\n<legend>" . __('Export OPML:') . "</legend>\n";
    echo "<form method=\"{$method}\" action=\"{$action}\">\n" . "<p><label for=\"action\">" . __('Export OPML:') . "</label>\n" . "<input type=\"submit\" name=\"act\" id=\"action\" value=\"" . __('Export') . "\" />" . "</p>\n</form>\n" . "</fieldset>\n";
}
开发者ID:jphpsf,项目名称:gregarius,代码行数:12,代码来源:opml.php


示例11: Navigation

 function Navigation()
 {
     $this->appendNavItem(getPath(), __('<span>H</span>ome'), LOCATION_HOME);
     if (!getConfig("rss.config.restrictrefresh")) {
         $this->appendNavItem(getPath() . 'update.php', __('<span>R</span>efresh'), LOCATION_UPDATE);
     }
     $this->appendNavItem(getPath() . 'search.php', __('<span>S</span>earch'), LOCATION_SEARCH);
     $this->appendNavItem(getPath() . 'admin/', __('A<span>d</span>min'), LOCATION_ADMIN);
     if (($an = rss_plugin_hook('rss.plugins.afternav', null)) != null) {
         $this->postRender .= $an;
     }
     $GLOBALS['rss']->nav = $this;
     rss_plugin_hook('rss.plugins.navelements', null);
 }
开发者ID:jphpsf,项目名称:gregarius,代码行数:14,代码来源:nav.php


示例12: getPath

function getPath(array $ret, $id, $mysqli)
{
    $query = "SELECT * FROM shop WHERE s_rowID='{$id}'";
    $result = $mysqli->query($query);
    $obj = $result->fetch_object();
    if ($obj->s_parent == "") {
        $ret[] = array($obj->s_title, $obj->s_rowID);
        $ret[] = array("Shop", "");
        return $ret;
    } else {
        $ret[] = array($obj->s_title, $obj->s_rowID);
        return getPath($ret, $obj->s_parent, $mysqli);
    }
}
开发者ID:rocafuerte,项目名称:opus,代码行数:14,代码来源:admin_shop.php


示例13: env_CFG

function env_CFG()
{
    $content = file_get_contents("/etc/profile.d/werm.sh");
    //------------------------------------
    preg_match_all("/(.*?)=(.*?)\$/m", (string) $content, $match, PREG_SET_ORDER);
    //------------------------------------
    foreach ($match as $key => $value) {
        $env[$value[1]] = $value[2];
    }
    //------------------------------------
    foreach ($env as $key => $value) {
        $_ENV[$key] = getPath($env[$key], $env);
    }
}
开发者ID:awwthentic1234,项目名称:hey,代码行数:14,代码来源:config.php


示例14: indexAction

 public function indexAction()
 {
     if ($this->has('security.csrf.token_manager')) {
         $csrfToken = $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
     } else {
         // BC for SF < 2.4
         $csrfToken = $this->has('form.csrf_provider') ? $this->get('form.csrf_provider')->generateCsrfToken('authenticate') : null;
     }
     $em = $this->getDoctrine()->getManager();
     $media = $em->getRepository('SiteBackOfficeBundle:Media')->findOneById('31');
     $session = $this->getRequest()->getSession();
     var_dump($media . getPath());
     die;
     return $this->render('SiteFrontOfficeBundle:Default:index.html.twig', array('csrf_token' => $csrfToken, 'media' => $media));
 }
开发者ID:resing,项目名称:store,代码行数:15,代码来源:DefaultController.php


示例15: getBody

 public static function getBody($path)
 {
     // pls replace strng $path with proper params array (make parameter generation more abstruct)
     $items = array();
     $tag = preg_replace('#^tag/#', '', $path);
     $page = new Page();
     $page->tablename = "pages";
     $pages = $page->retrieve_many("tags like '%" . $tag . "%'");
     $view = getPath('views/tag/body.php');
     foreach ($pages as $data) {
         $data['view'] = $view;
         $items[] = $data;
     }
     return $items;
 }
开发者ID:makesites,项目名称:kisscms,代码行数:15,代码来源:tag.php


示例16: downloadFile

function downloadFile($dbxClient, $path)
{
    if (!$path) {
        header("Location: " . getPath(""));
        exit;
    }
    $fd = tmpfile();
    $metadata = $dbxClient->getFile($path, $fd);
    $file_name = str_replace('/', '', $path);
    fseek($fd, 0);
    $downloadPath = 'downloads' . $path;
    if (!file_exists($downloadPath)) {
        file_put_contents($downloadPath, $fd);
    }
    fclose($fd);
}
开发者ID:genextwebs,项目名称:dropbox-sample,代码行数:16,代码来源:index.php


示例17: routeRequest

/**
 * The request router looks at the URI path, tries to load it from /assets,
 * then tries to route the request through the Router if it's a model.
 * If it's not a model, the PageEngine tries to render the template file.
 */
function routeRequest()
{
    $path = getPath();
    if (!$path) {
        return PageEngine::renderPage('index');
    }
    if (File::find("assets/{$path}")) {
        File::render("assets/{$path}");
    }
    try {
        $router = new Router();
        return $router->route($path);
    } catch (ModelExistenceException $e) {
        return PageEngine::renderPage($path);
    }
}
开发者ID:asteig,项目名称:rabidcore,代码行数:21,代码来源:bootstrapper.php


示例18: getCurrentPage

 public static function getCurrentPage($defaultPage = "/home")
 {
     $strPage = $defaultPage;
     if (array_key_exists("path", $_GET)) {
         $strPage = $_GET["path"];
         /*} elseif ( array_key_exists("PATH_INFO", $_SERVER) ) {
         		$strPage = $_SERVER["PATH_INFO"];*/
     } elseif (strstr($_SERVER["SCRIPT_FILENAME"], getPath(""))) {
         $strPage = "/" . str_replace(getPath(""), "", dirname($_SERVER["SCRIPT_FILENAME"]));
     }
     // strip out paths
     $strPage = preg_replace("/\\/index\\.php\$/", "", $strPage);
     $strPage = preg_replace("/^\\/content/", "", $strPage);
     // if page exists, return it, otherwise return default page
     if (Page::isPage($strPage)) {
         return $strPage;
     }
     return $defaultPage;
 }
开发者ID:joel-cass,项目名称:structure-cms,代码行数:19,代码来源:UrlHelper.php


示例19: Header

 function Header($title = "", $active = 0, $cidfid = null, $onLoadAction = "", $options = HDR_NONE, $links = NULL)
 {
     _pf('Header() ctor');
     $this->docTitle = $title;
     $this->active = $active;
     $this->cidfid = $cidfid;
     $this->onLoadAction = $onLoadAction;
     $this->options = $options;
     $this->rawTitle = $title;
     $this->extraHeaders = array();
     $this->docTitle = makeTitle($title);
     if (getConfig("rss.output.titleunreadcnt") && is_array($cidfid) && ($uc = getUnreadCount($cidfid['cid'], $cidfid['fid']))) {
         $this->docTitle .= " ({$uc} " . __('unread') . ")";
     }
     if ($active == 1 && MINUTE * getConfig('rss.config.refreshafter') >= 40 * MINUTE) {
         $this->redirectUrl = guessTransportProto() . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
         if (substr($this->redirectUrl, -1) != "/") {
             $this->redirectUrl .= "/";
         }
         $this->redirectUrl .= "update.php";
         $this->redirectTimeout = MINUTE * getConfig('rss.config.refreshafter');
     }
     $this->links = array();
     $this->links[] = array('start', 'Home', getPath());
     $this->links[] = array('search', 'Search', getPath() . "search.php");
     $this->links[] = array('tags', 'Tags', getPath() . (getConfig('rss.output.usemodrewrite') ? "tag/" : "tags.php?alltags"));
     if ($links != NULL) {
         //var_dump($links);
         foreach ($links as $rel => $link) {
             $this->links[] = array($rel, $link['title'], $link['href']);
         }
     }
     $this->javascriptFiles[] = getPath() . "ajax.php?js";
     $this->javascriptFiles[] = getPath() . "extlib/md5.js";
     if (getConfig('rss.output.channelcollapse')) {
         $this->javascriptFiles[] = getPath() . "extlib/fcollapse.js";
     }
     $GLOBALS['rss']->sideMenu = new SideMenu();
     $GLOBALS['rss']->sideMenu->addMenu(__('Feeds'), 'FeedList', "_side('FeedList')");
     $GLOBALS['rss']->sideMenu->addMenu(__('Categories'), 'CatList', "_side('CatList')");
     $GLOBALS['rss']->sideMenu->addMenu(__('Tags'), 'TagList', "_side('TagList')");
 }
开发者ID:jphpsf,项目名称:gregarius,代码行数:42,代码来源:header.php


示例20: getConfig

 function getConfig()
 {
     $config = array();
     // get the raw db output
     $table_rows = $this->get_tables();
     // exit if no config is returned
     if (!is_array($table_rows)) {
         return false;
     }
     // clean up data in a better format
     foreach ($table_rows as $table => $rows) {
         // create the config table if it doesn't exist
         if (!array_key_exists($table, $config)) {
             $config[$table] = array();
         }
         foreach ($rows as $row) {
             // delete a duplicate key
             if (array_key_exists($row['key'], $config[$table])) {
                 // backwards compatibility - see if there's an id available
                 if ($row['id']) {
                     $c = new Config($row['id'], $table);
                     // delete entry
                     $c->delete();
                 }
             } else {
                 $config[$table][$row['key']] = $row['value'];
             }
         }
     }
     // verify config against the setup
     foreach ($config as $type => $properties) {
         $is_plugin = getPath($type . "/bin/config.php");
         $is_controller = getPath("controllers/" . $type . ".php");
         // delete the config entry if no controller/plugin found
         if (!$is_plugin && !$is_controller) {
             unset($config[$type]);
             $this->unregister($type);
         }
     }
     return $config;
 }
开发者ID:makesites,项目名称:kisscms,代码行数:41,代码来源:Config.php



注:本文中的getPath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPathImage函数代码示例发布时间:2022-05-15
下一篇:
PHP getPatchProductImage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap