個人用ツール

「関数リファレンス/BcBaser isCurrentUrl」の版間の差分

提供: baserCMS公式ガイド

移動: 案内, 検索
(Hanhunhun がページ「関数リファレンス/isCurrentUrl」を「関数リファレンス/BcBaser isCurrentUrl」に移動しました)
(相違点なし)

2015年5月11日 (月) 13:08時点における版

説明

指定したURLが現在のURLと同じかどうか判定する。

<比較例>
/news/ | /news/ ・・・○
/news | /news/ ・・・×
/news/ | /news/index ・・・○

使い方

$this->BcBaser->isCurrentUrl($url)

パラメータ

(string) $url
比較対象URL

戻り値

(boolean) 同じ場合には true を返す

用例

基本

コード

<?php $this->BcBaser->isCurrentUrl('/news/') ?>

応用

コード

 

出力

変更履歴

ソースファイル

関連資料